Microservice is one of the buzz words doing the rounds at the moment. So, what are microservices, and are they worth investing in?
A microservice is, as the name suggests, a small service (“fine grained” may be a better term to describe it). The idea behind it is that each microservice encapsulates a small chunk of functionality, and this functionality is distributed in a multi-node environment to provide a reliable and scalable service. It would generally be implemented as part of a system wide microservice architecture strategy, so this is something which would be designed in to your system.
For those of us who have been around a while this is just another iteration of the trend of breaking applications up into smaller parts. In the ‘olden days’ applications were developed as a big single lump of code named ‘monolithic’ apps. Since then we have seen ‘Client-Server’, ‘multi-tiering’, ‘SOA’, and various other architectures which aimed to divide the systems up into chunks which are easier to manage. Microservices architecture is really just the next iteration of SOA.
Implementation is usually done in conjunction with a selection of technologies which are used to house and orchestrate the services. Docker and Kubernetes seem to be the dominant forces in play at the moment and with the current support bundled into Microsoft’s Visual Studio, getting services up and running is relatively easy. Hosting is also well supported on both the Microsoft Azure Platform and Amazon’s AWS Platform, as well as others.
As with everything in IT there are pros and cons. The main benefit is the breaking up of the system. This makes the system much easier for developers to understand as everything is broken down into smaller chunks. It is also especially good in a team which has multiple developers working in the same space. Scaling this kind of system is generally easier as well – if you need more processing power then you just scale out the number of nodes.
On the downside however, the more ‘broken up’ a system becomes the easier it is to start losing track of where things are. Something which often happens is that developers just keep adding services, which leads to so many chunks that it becomes difficult to manage. For this reason it is critical to have good governance, control and structure in place to prevent this from happening.
The question of whether to go down this route really depends on each scenario. If you are working on a system which you anticipate will have a lot of users or will come under a lot of strain then this architecture will certainly help spread the load. However, for smaller applications it might not be worth the additional work involved in implementing and managing the services.
Something to remember is that you can always migrate to this architecture at a later date providing you structure your code in a way which will easily allow it.
Get in touch if you would like more information on implementing microservices in your systems.