From a Monolithic Single Instance Server to Microservices Freedom
Join the DZone community and get the full member experience.Join For Free
our phenomenal hosting partner in sweden elastx easy:paas was courting a new client, björn lundén (bl). they were stuck with a hosting partner that only offered monolithic single instance virtual servers, with a set and static number of preferences.
bl needed scaling options, as their number of users grew and they needed the ability to scale separate components of their app. after meetings with the elastx team, they were introduced to the benefits of microservices, and the freedom to innovate and optimize within the jelastic platform.
a monolithic application is where all of the required logic is located within one ‘unit’ (a war, a jar, a single application, one repository). the design philosophy is that the application is responsible not just for a particular task, but perform every step needed to complete a particular function.
microservices is a software architecture design pattern, in which complex applications are composed of small, independent processes communicating with each other. these services are small, highly decoupled and focus on doing a small task.
in jelastic each environment within a large, complex and enterprise-ready application represents a service that can be scaled , configured and monitored separately. and if any change is required in the project, it can be easily made in the specific service without any need to rebuild and redeploy the entire application (as it is demanded in monolithic apps). with such structure, the application can even be managed by different teams, when each is responsible only for a certain part.
key aspects of microservices are:
- they do one thing or are responsible for one functionality
- each microservice can be built by any set of tools or languages since each is independent from others
- they are truly loosely coupled since each microservice is physically separated from others
- relative independence between different teams developing different microservices
- easier testing and continuous delivery or deployment
enter elastx easy:paas powered by jelastic. clusterization. cloud-in-a-box.
henry arousell from björn lundén chatted with us about the transition to the platform and the benefits of microservices for continuous scalable deployments.
tell us about björn lundén
björn lundén information ab started started in 1987 as a book publishing company specializing in books about law and economics. we make hard-to-understand- things easy. the company also does lectures on these subjects.
the last 15 or so years, we have also added software to our line of products and services and the last 3 years we have offered the product bl ekonomi. it is a service, offered as a subscription (per month/year) that allows the user to manage their small business accounting and invoicing needs.
how many total users do you have currently?
we have about 11,200 licences out of which about 3,600 are active users on a regular basis, that all in all use about 31,500 databases.
what was the challenge you faced?
well, many. but certainly one of the hardest was to find a reliable partner that, not only shared our view of qos (quality of service), but also had the platform and know how to implement it. for us as mainly a developer organisation, finding a partner that complimented us with server and production environment expertise was paramount.
what was the solution?
the server side of the application runs on top of two elastx easy:paas/jelastic environments:
- one with nginx on top of two tomcat nodes that powers the actual application, written in java 7
- the other one is a massive mysql server that runs more than 31500 organisation databases
why jelastic/elastx easy:paas?
we met the elastx crew at sweden’s biggest java developer conference jfokus and kind of took it from there. at the time we were in big need of help with scaling and we were in a situation with a partner that only offered monolithic single instance virtual servers with a set and static number of preferences, which made it very difficult for us to scale as the number of users grew.
when we saw the jelastic console we were blown away. as our software organisation consists mainly of developers, we immediately wanted to get our hands on such an intuitive tool. not only for our production needs put for a multitude of testing and laboratory level stuff. i know it might sound cheesy, but we really were in awe.
how have you set up your environment?
on march 25, 2015, our tomcat environment look like this:
and the environment running mysql looks like this:
what were the results when you switched to elastx easy:paas?
the biggest difference in our daily life is probably accessibility to the production environment. we now have access to logs and servers statistics at the tip of our fingertips. no longer do we have to contact a guy at the server center and ask him for such info.
no, wait, the biggest difference is that as we’ve watched our product grow in customer popularity and the demand for more server power that comes along with that, we have been able to increase this very easily ourselves.
what was the cost difference?
that is really hard to say since we have grown tremendously since switching to elastx easy:paas. but it’s safe to say that it is better than before since we paid a flat rate for our virtual servers, regardless of usage or load.
did you see a performance increase?
yes. very much so. it is hard to say exactly how much time was saved and to us it wasn’t really the unique selling proposition we were looking for. the biggest difference was that we are now able to purchase the correct amount of computing power. with a static server setup, we would either have too little power, or to have enough, we would have to pay such amounts of money that it killed the business case. when we know the alternative, it’s really hard to understand that a 24/7/365 flat rate was ever considered a reasonable arrangement.
but, of course. being able to purchase the right amount of power when needed has enabled us to provide a much better customer experience at an affordable price!
highlights of using the platform
well, the bl ekonomi server core is, in itself, a monolithic design. as it happens though, we are in the process of adding to it a series of microservices to add new and extended features. in this process we are involving the people at elastx to help us find the optimal solution for providing a smooth continuous integration environment to the developers.
shortest time to implementation compared to other providers or solutions you have tested or used in the past?
when first releasing on the elastx/jelastic platform, we did a one or two day workshop with the guys at elastx to show them our product and set it up correctly leveraging all the new possibilities of load balancing and having separated the tomcat and mysql nodes from the previous production setup. as easy as pie.
microservices are, in a way, return to basics with simple applications that are fulfilling today’s needs for complexity by working together through utilization of each others apis.
the container system in the jelastic cloud goes hand in hand with the microservice architecture pattern. one of the recent technologies underlying microservices is docker , a technology for packaging applications and deploying them in containers. be sure to try it out with 14-day free trial and comment below about your experience with jelastic.
Published at DZone with permission of Amy Armitage, DZone MVB. See the original article here.
Opinions expressed by DZone contributors are their own.