Tuesday, April 28, 2015

SPRING BOOT: It boots fast but fails on prouction

This post talks about the reasons you should not use spring boot for production application development. Spring boot it boots your development fast but fails to impress on production; I would use spring boot for a small tool or a hobby project, not for my production system.


Spring boot is a great way to start with your development. Yes it takes out all the dependency mess which is a major nightmare for many spring developers. All is well until you want to move your spring boot to production. Following are the few things which you may not like as a spring developer

  1. If you want to use your own container then that is not straight forward
Most of the production systems will have  well tuned container (say tomcat) and you would want to deploy your application on this tuned container. But having to write a class to make your app deploy-able on a tomcat is something which I would not like to do. Let me focus on my business logic not on writing custom classes for my framework

  1. The embedded tomcat in executable jar is little configurable.
After reading point 1, you may think that there is an option to use the embedded tomcat in the spring executable jar. It sounds good until you dive deep into the details.If you want to configure an AJP port then you are again asked to write a class. Similarly any advanced configuration of the tomcat is not going to be easy. Do you really want to spend time writing code to integrate your framework with tomcat?.

     3. Monolithic architecture.
I liked the way I used to manage spring maven modules and embed by common modules in multiple projects. with spring boot you have a big monolithic project which is useless outside the project. If you want to develop reusable component then again you need to fall back to plain old spring framework.

I recommend you to consider the above points to before considering spring boot for your production system development. I am sure you won’t like it for a long term production grade software project development. My opinion is to refer spring boot and build your pom as it is a good way to verify your dependencies.