The Basics of Microservices: Breaking Down the Jargon

Varun Bagga
Engineering Manager
4 min readJan 4, 2023

If you’re new to the world of software development, the term “microservices” might sound intimidating. But don’t worry — microservices are actually a pretty simple concept, and they can be a great way to build large, complex programs.

In traditional software development, a program is usually built as one large piece of code that does everything it’s supposed to do. But with microservices, a program is built out of small, independent pieces called “microservices.” Each microservice is responsible for just one thing, and they all work together to make the program run smoothly. It’s like a bunch of little helpers all working together to get a job done.

To understand microservices, let’s start with an analogy. Imagine you’re planning a vacation. You might want to book a flight, find a place to stay, and plan some activities to do while you’re there.

In traditional software development, you might have one person (or a group of people) responsible for helping you with all of these tasks. They would be responsible for finding flights, booking a hotel, and planning activities, all as one big job.

But with microservices, you would have multiple people (or “microservices”) each responsible for just one task. You might have one person who helps you find flights, another person who helps you find a place to stay, and another person who helps you plan activities. Each person (or microservice) is responsible for just one thing.

Here’s another analogy to help you understand microservices: imagine you’re building a house. In traditional software development, it would be like having one contractor responsible for everything — foundation, framing, plumbing, electricity, and so on. But with microservices, it would be like having one contractor responsible for the foundation, another contractor responsible for the framing, and so on. Each contractor (or microservice) is responsible for just one thing, and they all work together to build the house.

So why would you want to use microservices instead of just having one person (or one big piece of code) do everything? There are several advantages:

  1. Scalability: It’s easier to scale a program built with microservices because you can scale each microservice individually, rather than scaling the whole program as one unit. For example, if you’re planning a big trip with lots of flights and hotel rooms to book, it might be easier to have one person (or microservice) responsible for flights and another person (or microservice) responsible for hotels, rather than having one person try to do everything. This way, if the demand for flights increases, you can add more people (or “scale up” the microservice) to handle the increased workload without also having to scale up the other microservices.
  2. Flexibility: Microservices are independent of each other, which means you can make changes to one microservice without affecting the others. For example, if you want to change your flights, you can do that without having to worry about how it will affect your hotel reservations or activities. This makes it easier to make changes to your program without breaking anything.
  3. Easier to understand: Because each microservice does just one thing, it’s easier for developers to understand how that microservice works and how to make changes to it. This can make it faster to develop and maintain the program. In the vacation planning example, if you have one person responsible for finding flights and another person responsible for finding a hotel, it’s easier to understand what each person is doing and how it all fits together. This can make it easier for new developers to join the project, because they only have to understand one small piece rather than the whole program.
  4. Easier to test: Since each microservice is independent, it’s easier to test each one individually to make sure it’s working correctly. For example, if you have one person responsible for finding flights and another person responsible for finding a hotel, you can make sure the flight-finding process is working correctly before you start working on the hotel-finding process.
  5. Easier application deployment: Because each microservice is a small, independent piece of code, it’s usually easier to deploy a microservice than it is to deploy a large, monolithic application. This is because there is less code to deploy, so there is less risk of something going wrong during the deployment process. Also, it’s usually faster to deploy a microservice-based application and can be especially useful if you need to deploy updates or bug fixes to your application quickly. So, even if something goes wrong into production, it’s usually easier to roll back changes because you only need to roll back the changes to the affected microservice, rather than rolling back changes to the entire application.
  6. Flexibility of using different technologies: One of the benefits of using microservices is that different microservice can be built using the different technologies based on need, rather than being limited to a single technology stack for the entire application. For example, you might use one technology stack for a microservice that processes data and another technology stack for a microservice that handles user authentication. This allows you to choose the best tools and technologies for each microservice, rather than trying to fit everything into a single stack.
  7. Maximum uptime: If one microservice fails, the other microservices can continue to operate normally. This can help to minimize the impact of failures on the overall system and make it more resilient meaning less downtime for an application.

Overall, microservices are a useful way to build large, complex programs by breaking them down into small, independent pieces. Each microservice is responsible for just one thing, which makes it easier to develop, maintain, and scale the program. So the next time you hear the term “microservices,” just think of a team of people each working on a specific task to help you plan the vacation of your dreams!

--

--