Microservices are an application architecture style where independent, self-contained programs with a single purpose each can communicate with each other over a network. Typically, these microservices are able to be deployed independently because they have strong separation of responsibilities via a well-defined specification with significant backwards compatibility to avoid sudden dependency breakage.

Why are microservices getting so much buzz?

Microservices follow in a long trend of software architecture patterns that become all the rage. Previously, CORBA and (mostly XML-based) service-oriented architectures (SOA) were the hip buzzword among ivory tower architects.

However, microservices have more substance because they are typically based on RESTful APIs that are far easier for actual software developers to use compared with the previous complicated XML-based schemas thrown around by enterprise software companies. In addition, successful applications begin with a monolith-first approach using a single, shared application codebase and deployment. Only after the application proves its usefulness is it then broken down into microservice components to ease further development and deployment. This approach is called the "monolith-first" or "MonolithFirst" pattern.

Microservice resources

  • Martin Fowler's microservices article is one of the best in-depth explanations for what microservices are and why to consider them as an architectural pattern.

  • Developing a RESTful microservice in Python is a good story of how an aging Java project was replaced with a microservice built with Python and Flask.

  • Microservices: The essential practices first goes over what a monolith application looks like then dives into what operations you need to support potential microservices. For example, you really need to have continuous integration and deployment already set up. This is a good high-level overview of the topics many developers aren't aware of when they embark on converting a monolith to microservices.

  • Using Nginx to Load Balance Microservices explains how an Nginx instance can use configuration values from etcd updated by confd as the values are modified. This setup can be useful for load balancing microservices as the backend services are brought up and taken down.

  • How Microservices have changed and why they matter is a high level overview of the topic with some quotes from various developers around the industry.

  • The State of Microservices Today provides some general trends and broad data showing the increasing popularity of microservices heading into 2016. This is more of an overview of the term than a tutorial but useful context for both developers and non-developers.

  • bla bla microservices bla bla is a transcript for a killer talk on microservices that breaks down the important first principles of distributed systems, including asynchronous communication, isolation, autonomicity, single responsibility, exclusive state, and mobility. The slides along with the accompanying text go into how reality gets messy and how to embrace the constraints inherent in distributed systems.

  • In the Microservices with Docker, Flask, and React course bundle, you will learn how to quickly spin up a reproducible development environment with Docker to manage a number of microservices. Once the app is up and running locally, you'll learn how to deploy it to an Amazon EC2 instance. Finally, we'll look at scaling the services on Amazon EC2 Container Service (ECS).

  • Should I use microservices? contains a high-level perspective on why or why not use microservices as an architectural choice.

  • Zuul is open source proxy for combining multiple microservices into a unified API call. Check out this post on Using Netflix Zuul to Proxy your Microservices to learn more and get started using it.

  • The Majestic Monolith explains the advantages of a monolithic architecture and how it's worked amazingly well for the Basecamp small development team.

  • Developing a RESTful micro service in Python goes into detail on how one development team rebuilt an existing Java application as a microservice in Python with Flask.

  • Documenting microservices has some good thoughts on how to explain your microservice API to other developers such as clearly showing all of the endpoints as well as the intersection of multiple endpoints.

  • Best practices for building a microservice is an exhaustive (and somewhat exhausting to read!) list with what you should think about as you build your microservice.

  • The Hardest Part About Microservices: Your Data presents a data-centric view on how to structure and transport data in a microservices architecture.

  • Deleting data distributed throughout your microservices architecture examines how Twitter handles issues with discoverability, access and erasure in their microservices-heavy production environment.

What's next after learning about microservices?

I've built a Python web app, now how do I deploy it?

What is Docker and how does it fit with Python deployments?

How do I create an API for my web application?

Matt Makai 2012-2022