Written by Joel Engardio for Nexient

Escape the Spaghetti Bowl
The promise and pitfalls for companies that want to scale with microservices

If your organization built an application anytime before 2014, the phrase “hellscape of spaghetti code” likely describes the abyss you find yourself in. That’s because you’re wrestling with a monolithic legacy application where the database is the primary integration point.

You know that relying on a central database creates a bottleneck. So you’re eyeing a microservices solution. You’ve heard it’s the best way to achieve what you want — massively scalable and distributed systems. Yes, the promise is true. But is your mid-sized company ready and able to take the leap? Only a good dose of self-awareness can answer that question.

Proceed With Caution
“Microservice” is a trendy word that is often misused and overused. First, simply putting a RESTful web service on an existing database is not a microservice. A true microservice involves slicing up your application into independently deployable, and scalable components. They must be loosely coupled and ideally event-driven.

If done incorrectly — which commonly happens — your hope for a microservices architecture can end up becoming another distributed, complex meatball. Even if done well, a microservice-based architecture is not a panacea. Not all of your applications are going to be built using microservices.

It takes a lot of maturity in deployment and operation of services for a company to be successful with microservices. That’s why we tend to think microservices are for large enterprises. The fact the applications are containerized means you need built-in infrastructure to monitor the system and make corrections in real time. Comprehensive automated tests are critical so you know you are defect free every time you deploy. Using DevOps are a must because deployments — and rollbacks — have to be automated and fast.

If you’re not ready or able to follow these practices, don’t try microservices at home.

Microservices for Mid-Sized Companies
Mid-sized companies with smaller-scale projects have the most to gain from microservices. That’s because a microservice-based architecture is actually a growth enabler. An SMB with a great idea can easily build a system that starts small and scales. Thanks to microservices, smaller players can compete with the big guys.

Microservices alone, however, won’t get you there. Scaling and flexibility also require organizational change, maturity and commitment. The most common barrier is resistance to change. If your company’s developers don’t embrace automated testing and insist on business logic living in a stored procedure, you’re not ready to attempt microservices. But if you tried agile, the transformation went well and you’re still in a three-to-six-month release cycle, then microservices might be for you.

To really do microservices right, organizations must realize the initiative involves more than just building the services themselves. It requires embracing automated testing and DevOps to ensure success. Companies like Netflix, which are seen as the champions of microservices all started small, learned from mistakes and kept going.

With luck, microservices mean you’ll never have to untangle a bowl of spaghetti code again.