From Monoliths to Microservices

Microservices represent the latest evolution in modern service-oriented architectures. The typical monolithic architecture was inflexible:

  • it typically only scales up, not out;
  • it has a large and complex code base, meaning a long learning curve for new team members; and
  • it has tightly coupled dependencies so that everything must be released at once, making even surgical changes difficult and slow.

Microservices architectures bring tremendous flexibility. Microservices are “simple, and do one thing well” (Sam Newman):

  • they allow you to scale separate components independently;
  • they typically are easier for new team members to wrap their heads around; and
  • they allow you to release independent pieces of your application on independent schedules, enabling the continuous delivery of independent business capabilities.

But microservices bring with them the challenges of deploying and operating large-scale distributed systems—challenges we didn’t have to face with monolithic architectures. What used to be as simple as a global variable now requires a shared configuration solution. What used to be a simple in-process call to a separate module might now require looking up healthy instances of a dynamically-addressed scaled-out service and load-balancing requests across the instances. And if one of the services you depend on stops responding, how do you fail gracefully and prevent your users from seeing an unfriendly error message?

Something more is needed!

Netflix OSS and Spring Cloud

The good news is that these problems have already been solved. The developers at Netflix have not only addressed the challenges of building distributed systems at tremendous scale—their video streaming platform at one point accounted for 37% of North America’s Internet traffic [1]—they’ve implemented solutions to them based on well-characterized patterns, and then gifted those solutions to the world as open source.

The Spring Cloud project makes these solutions accessible to the broader Java community, filling in gaps such as configuration management with original solutions such as the Spring Cloud Config Server. Until now, however, these solutions were largely focused on Java and not very accessible to .NET developers.

With the advent of Steeltoe, that has changed!