What the #^%@ are microservices (and why should I care)?
Trust me, if you’re involved in selecting technology for your company, you should care!
In short – “microservices” is a term used to describe a software architecture in which the various subsystems or services of an application are independent or very loosely coupled. This is in contrast to “monolithic” software architectures where all of the subsystems are tightly interconnected.
Most legacy enterprise software applications (CRMs, email, unified communications/contact center) are architected using a monolithic approach. All of the various subsystems (such as those that handle logins, routing, reporting, data retrieval/storage, etc.) are usually designed to run closely on the same server. Typically, if one subsystem fails, all fail. If one needs to be patched or updated, all are affected. If we desire redundancy and scalability, all must be replicated in total.
Those monolithic sort of systems would benefit greatly by being re-architected using microservices. How so? Let’s look at an analogy of a chef in a busy restaurant kitchen…
Rather than process logins, route objects, and send/receive data, chefs must be able to cook various courses such as appetizers, entrees, and desserts.
In a monolithic architecture you have a single private chef who prepares every single course of food specifically for you. If he cuts his finger chopping veggies for the appetizer, then production of all courses is halted. If he needs to learn a new soup recipe, then all production is halted as well.
Since this likely isn’t acceptable you have another identical chef waiting on the sidelines ready to take over. This is problematic for many reasons. For starters, having two highly skilled chefs dedicated to your kitchen is quite expensive – especially given you’re only using one at a time. Secondly, a transition between chefs is never as smooth as hoped for. Inevitably when the 2nd chef takes over orders will be lost, mistakes will be made, and the production of food will be slowed down. Also, what happens when you have that big dinner party a few times a year? Your chef won’t be able to keep up…
Now imagine a kitchen that uses microservices. Instead of having one (or two) chefs who know it all, we have a plethora of microchefs – and they each know how to do only one thing (but do it very well). We have a chef that knows how to make soup. One that bakes bread. One that grills the meat, one that creates desserts… you get the picture. Now if one chef gets hurt or needs training only one small area is affected rather than the greater whole.
Of course having that many chefs doesn’t seem manageable (or cost effective) does it? Well, no, not until we move them into the cloud kitchen and have multiple diners consume their food.
Once we pair microservices with cloud technologies such as load balancers and auto-scaling we see the real benefit.
When you’re not ordering soup someone else probably is – so the soup microchef will be (securely) put to work there using load balancing. If multiple people order soup at the same time then auto-scaling technology will spin up more soup microchefs on the fly, and then send them home after the dinner rush to ensure we’re not overpaying staff. If a new soup recipe is added to the menu it will be taught only to brand new microchefs while not distracting the others already cooking. Load balancers will hand out updated menus with the new soup to all new guests moving forward – no downtime needed at all when the menu changes.
This concept of constantly updating the menu without having to stop accepting new guests (or negatively impacting the experience of existing guests) is called continuous delivery in the software world. Gone are the days of patching/applying updates.
Modern microservice-based software platforms experience extremely high uptime, are infinitely scalable, and require no downtime for maintenance.
If you’re in the market for new cloud technology, be sure and ask your vendor the following questions:
- Do I need to contact you if I double my user count?
- Is there downtime for maintenance and upgrades?
If the answer to either question is yes, the solution probably isn’t utilizing microservices nor benefitting from the distinct advantages they provide.
For further reading on microservices, Martin Fowler has a great article, here.
As well as the PureCloud Resource Center.