Why Companies Like Netflix, Uber, And Amazon Are Moving Towards Microservices

In case you have been living under a rock, let us break the news for you- Monolith is out, and now most internet companies have moved towards microservice architecture including Netflix, Uber, Amazon, and Apple.

There were many reasons for the shift, but the most important one was that monolithic is a big autonomous unit and handling it becomes more difficult by the day as the monolith grows bigger when you add new functionalities. Even the smallest change or bug fix requires a complete re-coding and re-deploying of a new version of the application. With microservices, all the processes get simplified, scalable, and streamlined as all the functionalities are divided into independent units.

When we focus on the industry disrupting companies like Airbnb, Uber, and Netflix, we see organizations that are continuously building custom software to get a competitive edge. In fact, many of the companies are not even core technology companies. Instead they use software to provide unique offerings. The results, as we know, drive great revenue for the companies.

Why Microservices Is A Better Option For Breaking Down Monoliths

Even with all the various open source tools and products, maintaining and deploying applications on the cloud is still difficult and time-consuming. Since most of these companies were launched over six to seven years ago, they had no other option but to create their own cloud platform on raw infrastructure.

There was a need for management layers between the applications and cloud infrastructure that they were being created. But it still proved to be better than the monolith architecture, since with microservices they can manage all the different operations of the application separately. So, even if a part of the application is down or needs bug fixes, the rest of the application will still be up and running with no downtime.

Let’s discover how companies like Netflix, Uber, and Amazon are moving towards microservices:

Netflix

In 2009, when Netflix started to migrate a monolithic infrastructure to a microservices one, the term ‘microservices’ didn’t even exist anywhere. Working on a monolithic architecture was proving to be difficult for the company with every passing day and the service would have outages whenever Amazon’s servers went down. After moving to microservices, Netflix’s engineers could deploy thousands of different code sections every day.

Forced to write their own entire platform on the cloud, the company has been pretty open about what they learned with the move, and they have even managed to open source many of the components and tools to help the community. Though Netflix hasn’t put up their entire platform code on Github, which could also help new companies. Overall, moving to microservices was incredibly beneficial for Netflix, and it has led to decrease their application’s downtime to a large extent.

Amazon

Back when Amazon was operating on a monolithic architecture, it was difficult for the company to predict and manage the fluctuating website traffic. In fact, the company was losing a lot of money as most of the server capacity was being wasted in downtime. Back in 2001, Amazon’s application was one big monolith.

Even though it was divided into different tiers and those tiers had different components, they were tightly coupled with each other, and they behaved like a monolith. The main focus of the developers was to simplify the entire process, and for that, they pulled out functional units from the code and wrapped them in a web service interface. For instance, there was a separate microservice was calculated the total tax at check out.

The company’s move to Amazon Web Services (AWS) cloud for microservices helped them scale up or down according to the traffic, handle outages better, and save costs as well. Since microservices allows to deploy code continuously, engineers at Amazon now deploy code every 11.7 seconds.

Uber

Just like any other startup, Uber too started with a monolithic architecture for their application. At that point, it seemed cleaner to go with a monolithic core since the company was just operating in San Francisco and only offered the UberBLACK option to users.

But as the ride-sharing startup grew multi-fold, they decided to follow the path of other companies like Amazon, Netflix, and Twitter and moved to microservices. The biggest advantage of migration was, of course, the fact that each microservice can have its own language and framework.

Now, with more than 1300 microservices, Uber focuses on applying microservices patterns that can improve scalability and reliability of the application. With so many microservices, a big focus is also on identifying the ones that are old and not in use anymore. That is why the team always ensures to decommission the old ones regularly.

In conclusion

While its natural for new companies to take the monolithic-first approach because its quick and you can deploy quickly as well, over time, as the monolith gets bigger, breaking it down into microservices becomes the most convenient solution.

5 Reasons Why You May Want To Stick With A Monolithic Architecture

Microservices and distributed computing have become the new buzz word among DevOps. Everyone wants to migrate their architecture to microservices, mostly because it is the new trend. Because of that, monolithic applications seem more like a burden on cloud computing.

The strange thing here is that monolithic appalications were never claimed as the best option, they just seemed like the most common and convenient option. That is why many companies still start their operations by coding a monolithic core.

Monolithic architecture brings with it many sturdy benefits that we cannot ignore, all because it doesn’t fit well with the modern architectural practices. On the contrary, microservices add complexity to an application, which is not always necessary.

Here are some reasons why you may want to stick to a monolithic architecture:

1. Monoliths are better for complex enterprise apps

The reason why microservices have gained popularity in the last few years is that a number of leading internet companies have migrated to it, including Uber, Netflix, Apple, and even Amazon. While implementation of microservices makes more sense for these cloud-based companies since they have a large customer base and downtime in one of part of the application does not affect the whole. It is also easier for developers to continuously update the code or add bug fixes without any downtime.

But the complexity that microservices brings with it, may not be worth it if the application is not that big or it is an enterprise level application. With a monolithic core, developers do not have to deploy changes separately; they can do it all together — thus saving them a lot of time.

2. Testing and Debugging

It is much easier to debug monolithic applications, as compared to microservices. That is because, with microservices, there are hundreds of new variables introduced, and any of them could go wrong and create problems.

Not to mention, lesser dependency among variables in microservices means, it can be difficult to determine when an interface contract or compatibility is broken. To put it simply, you may not even know what has gone wrong until you are at runtime.

3. Performance

For an application that is accessed by millions or thousands of users every day, adding the complexity of microservices may be worth the extra effort. But, what you need to remember as a developer is that most enterprise business applications do not even come near that many number of users.

Now, if you create a new application that takes several seconds to load every new screen all because it needs to make 50 API calls to 50 microservices, then your end users are not going to care about your modern architecture. All they will see is an application which takes a lot of time to load. You could add request collapsing and clever caching, but that is just an extra set of complexity that you did not even need in the first place.

4. Security

Diving an application into hundreds of microservices does not just mean that you will have to decide how these microservices interact with each other but you will also have to decide a security protocol for each one of them. For instance, some microservices might have access to sensitive company data, while some may not. To manage a coarse-grained application like that, you will have to define security borders, even before you start to segment microservices.

5. Designing the Architecture

Designing a microservices architecture can takes weeks to months of initial planning just to get your project off the ground. It also means that you would have a higher upfront design cost and may even need to hire more developers just to break down microservices. There is a continuous risk of over-architecting and you may end up creating more microservices than you need, which will, in turn, increase the complexity of the architecture.

With a monolithic architecture, the development takes much lesser time, both in planning and designing. It also saves overall costs.

Breaking Down A Monolithic Application: Microservices vs. Self-Contained Systems

In modern architecture, monolithic architecture and applications have become a thing of the past, and every organization is moving forward to break them down. After all, moving away from monoliths is a logical decision since its more complicated and there are also many dependencies and issues with deployment and testing.

For most developers, microservices seem like the most obvious solution to replace monoliths. But in this article, we will be discussing how self-contained systems can also be a successful option for breaking down monoliths.

Microservices

One of the most obvious benefits of microservices is that it allows users to do continuous deployment and change, debug, or replace a part of the application without affecting the rest of the application. Using microservices architecture means, if anything goes wrong in a part of the application, it is contained in that very part, and the rest of the application continues to work without a glitch.

However great microservices may sound, transforming a monolith into microservices architecture is easier said than done. Depending on the size of the monolithic core, it can take a few months to years, just to convert a monolithic core into multiple microservices.

Pros

  •     Maintaining microservices is comparatively much easier because each one of them has its own purpose and built with a laser-like focus on that very purpose. It also allows developers to jump in and out of microservices quickly. They are easy to run and quick to deploy.
  •     Since all the microservices in an application are isolated from each other, if one part fails, it does not affect the other and does not lead to downtime. For instance, even if the microservice that handles adding new orders is down, your customers would still be able to check the status of their existing orders.

Cons

  •     Every application may have hundreds of microservices, making them operationally complex. Developers cannot manage it all at once on the same server or deploy them one by one. Instead, they will require automation to handle everything.
  •     Communicating messages from one microservice to another takes a lot of effort because developers need to make sure the data is transferred sensibly and consistently. More often than not, you will have to create a new microservice to handle transfer and authentication of data.

Even with those cons, microservices are still preferred over monoliths. The initial time taken to break down a monolith into microservices may be a lot but after that, what you get is an easy to manage architecture.

Though, if the initial costs and time for creating microservices is a lot for your organization and handling monolithic applications has become incredibly complicated, you might want to consider the self-contained system as an option.

Self-Contained System

Self-Contained Systems (SCS) are similar to microservices in the way that they allow you to breakdown a monolith into smaller and independent parts. But, there are many differences between SCS and microservices:

  •     In SCS, you break a monolith down into replaceable and autonomous web applications, which isn’t the case with microservices
  •     The SCS units are within software and larger than microservices
  •     SCSs have their own autonomous user interface (UI), data storage, and business logic, making them more customizable than microservices
  •     While API level integration of SCS is possible, UI level is a more preferred integration

Since SCS is bigger than microservices, when you break down a monolith, creating SCSs takes much lesser time than microservices. Instead of being a complete redesign, SCS makes an application more agile by dividing it into small steps to reduce chances of failure.

Pros

  •     One of the biggest advantages of a self-contained system is that you can build several SCS units, each with different databases and languages.
  •     With monolith broken down, you can easily handle the coding and deployment of the application. Since the data is internal, you do not need to worry about how messages get passed from one SCS unit to another.

Cons

The line between SCS and microservice does exist, but it is slightly blurry, which means, it can be difficult for you to define an SCS architecturally. There is a lot more planning that goes into it before you can begin to break a monolith down into a self-contained system

Choosing Between Microservices Vs Self-Contained Systems

If you want to break down a monolithic and your end goal is microservices, you could still start with a self-contained system and then move towards microservices. Though you have to be patient while breaking down SCS units to make your software more agile.

As mentioned above, planning is more important than ever otherwise you might end up with SCS units that get bulkier and bigger with time. If that does happen, you will have to start breaking them into microservices.