blog single gear
Tutorials | Videos

Video: How to Break a Monolith with Node.js Microservices on Cloud Foundry

“It’s more of a black art than a science at this point.” — Tony Erwin, IBM

Breaking a monolith is never easy. In fact, one should never break down the entire monolith and rebuild microservices from its ashes. Instead, it’s best practice to chisel pieces from the monolith over time and replace them with microservices.

That’s exactly what IBM did with its Bluemix UI, IBM’s cloud offering that runs on Cloud Foundry. It started off as a single page application, using Dojo frontend, single Java server backend. But IBM quickly realized that’s not the solution they wanted to go with for their cloud environment.

Tony Erwin, lead architect for Bluemix UI, talked about the problems they faced with the monolith IBM Bluebox UI. Dojo has a very large Javascript framework, which led to some bottlenecks. Since it was a single page application, there was no data from the server in the initial payload, and was all AJAX requests, which bogged things down. It was difficult to integrate code from other teams  and it suffered from poor SEO optimization, because HTML payload didn’t have any searchable data. As IBM looked for new talents, it was hard to find people who were interested in working with Dojo.

All of these, and many other issues, led IBM to move to a lightweight, modern infrastructure. That’s when they decided to go the microservices route. However, they could not break the entire monolith down, as it was a live production system. At the same time, new features were being added to it, so they started to break it down piece by piece and replace it with microservices.

“We went down the path where we could slowly break this monolith down into microservices — a lighter weight stack,” said Erwin. “But [we kept] the core monolithic aspect of the product alive as we broke things apart.”

They now have four public Cloud Foundry deployments in four different regions: Dallas, London, Sydney and Frankfurt. Unlike before when they had individual URLs for each region, now they have a global console and single URL which allows them to switch to any region they want.

Not only did breaking down the monolith improve performance and manageability and enable different teams to plug into the infrastructure, it also impacted SEO optimization as they are able to do more server side templating, with more content in the individual pages rather than a monolithic single page app.

In a nutshell, moving to the microservices route with Cloud Foundry solved all of their problems. But with new processes comes a new set of challenges. Now, instead of one big monolith, they have hundreds of microservices. As a result, things like monitoring have become more important than before, so new investments are needed in those areas.

If you  are interested in breaking down your monoliths and moving to microservices, check out  Erwin’s talk and learn from IBM’s lessons.

Swapnil Bhartiya Profile Image

Swapnil Bhartiya, AUTHOR