Microservices is a technology that many companies are starting to adopt. Especially those that move digitally. Both e-commerce, transportation services, property services, and more.
Not without reason, the microservices architecture does allow startups and companies to better serve consumers, even virtually. Starting from offering a variety of services, to processing requests faster.
For example, the GroupWatch feature on the DisneyPlus service. Without microservices, DisneyPlus is unlikely to be able to offer great service with friends. Moreover, the location of watch in various countries with different internet bandwidth. Because, of course, it will be very burdensome on the server.
So that’s just one example of microservice. If you are interested and want to understand microservices further, congratulations, this is the right article. Without further ado, let’s see what microservices are!
What are Microservices?
Microservices is an architectural design for creating an application that consists of various separate service units but still connected to each other.
Each service unit in the application performs a different function, but still supports each other.
In a way, microservices is the same as building applications within applications. For example, implementing the microservices architecture in a super-app.
The term microservices has actually emerged since 2005. Precisely when Dr. Peter Rodgers discusses micro-web-services at a conference on cloud computing.
And now, about 85% of companies have adopted the microservices architecture.
Other research shows that microservices have succeeded in increasing employee efficiency, customer experience, and saving development costs in 63% of companies.
Because with this architecture, each team has its own authority so that it is more agile to execute plans. And because the company can develop only a portion of the service, the costs are much lower, but the release is faster.
Because the service can be immediately used by consumers, collecting feedback for service improvement is even faster. In addition, web/apps built with microservices also have lighter performance than those built with a monolith system.
Well, before getting to this article, maybe you are already familiar with monoliths. What is a monolith and what is the difference between monolith vs microservices? Take a look below!
Monolith vs Microservices
The opposite of microservices is a monolith. Monolith itself is an approach where all components or features are combined in one application server.
Compared to microservices, monolith is simpler. The entire system uses the same server, logic, database, and user interface.
But the risk, monolith system is not flexible to change. When you want to change one feature, the whole system will be affected. Deployment will also take longer because it has to be done in its entirety.
Even so, for small projects, monoliths are still suitable. But if your business continues to grow, it’s a different story. As an illustration, let’s look at the difference between monolith vs microservices.
Microservices
- Maintenance : Can adjust the needs of each module, no need for total maintenance
- Server rental costs : More expensive, especially since each component requires different resources
- Deployment : Does not interfere with other processes and modules
- Development flexibility : More flexible
- Request processing speed : Faster
Monolith
- Maintenance : When the server is down, all services will be affected.
- Server rental costs : Cheaper because it only relies on one server.
- Deployment : Easier and faster
- Development flexibility : It’s more complicated because you have to overhaul all the main apps
- Request processing speed : Slow because resources are shared
You can see, monolith is suitable for simple needs. But if your project is big, serious, and has high growth potential, then microservices are certainly more suitable.
5+ Characteristics of Microservices
Here are 5+ characteristics of microservices:
1. Aimed at Business Needs
The use of microservices helps companies achieve their business needs. Including providing various services with equally optimal services.
Not only in the technical and product development departments, but also through the division of teams with different focuses.
Let’s say startup A has a mission to facilitate property transactions in Indonesia. Startup A provides a variety of services. Buying and selling houses, renting apartments, to cleaning services.
To be more effective, each of these services is developed separately with a dedicated team as well. The goal is to make the work more focused.
Of course, the results will be faster and better. Especially compared to one big team that takes care of the entire project. The communication is definitely not effective and the progress of the work is also relatively slow.
2. Consists of Several Components
Microservices divides the main application into smaller ones. That means, web/apps that adopt this architecture definitely consist of many components. It can be services/products, servers, databases, and more.
Therefore, applications with microservices usually require a REST API to keep each unit connected.
3. Can Run Alone (Decentralized)
As you already know in the previous point, microservices allow a feature to run without the need for synchronization with other features.
In short, this approach allows each service to run independently. That way, every developer team in the company can develop features according to their service needs.
For example, developer A’s team used Java to build the login page, while the other team used C++ to build the menu.
4. Simple Routing Process
The next characteristic, simplifies the process in web/apps. Because it consists of small components, a feature can process requests without having to coordinate with other features.
So when a developer releases a new feature, there is less potential for disruption to the old feature.
5. Reducing the Risk of Failure
Since each component in web/apps can run on its own, microservices can reduce the risk of failure. When a feature crashes, other components are most likely unaffected.
6. Always Developing (Evolutionary)
Microservices provide more flexibility for development. Thus, the features in each component are easier to evolve, according to consumer needs.
For example, YouTube. Previously, YouTube only provided video views. However, YouTube wants to widen the monetization opportunities of its users. Therefore, YouTube released the YouTube Shorts feature.
Without microservices, the development of such features is of course a hassle. The development costs are also expensive.
So, to say the least, microservices allow you to add important functionality to your web/apps, without you having to change the main functionality of your app. So, the development process is also more efficient.
Advantages of Microservices
Here are the advantages of microservices:
1. Free to Upgrade
With microservices, you or your company will have more flexibility to upgrade the system. Mainly for adding resources.
That way, you can upgrade only certain services. For example, adding a web server resource for service A that the user is currently interested in.
In addition to optimizing resource use, companies can save even more. Because only services that really need the resources can be added. Not everything.
2. Free to Choose Technology
Each feature in the company’s services is built on a different technology. Whether it’s the framework, such as Kubernetes, Laravel, Docker. Or a different programming language like Java, Python, Objective-C, etc.
Well, microservices allow that to happen. Thus, company developers in each service can develop features with a more suitable technological approach.
3. Easier Maintenance
Because the main application is broken down into several services, maintenance is easier. Because, your development team doesn’t have to maintain all parts of the application. Enough on the services they hold.
4. Facilitate Error Isolation
In a monolith system, when one service is down, the others are affected. It’s different with microservices, where you can do error isolation.
Error isolation means that you confined the problem to a specific area or container. That way, other features won’t be splashed.
Disadvantages of Microservices
Disadvantages of microservices include:
1. Coordination between services is more complicated
As a result of the system being complex, the coordination between services may be somewhat more complicated. Because, each service runs separately.
Therefore, when developers perform certain tests, they need to work hard to reduce potential network latency issues or other errors.
2. More Expensive Cost
Microservices cost more. Because each database needs its own server and you also have more teams to manage.
For large projects, microservices are indeed able to increase the efficiency of various business processes and help companies earn greater profits.
But for small projects, microservices can actually cost you more capital and complexity.
3. The System Becomes Complex
When deciding to use a microservices architecture, you should be prepared for the system to be complex. There will be more programming languages, frameworks, and modules needed.
So when you want to do maintenance or update, it may not be possible to do it at the same time.
Examples of Using Microservices
These are some examples of microservices across different companies:
1. Netflix
Netflix started its journey in 1998 as a DVD rental place. In 2008, Netflix only offered a live-streaming movie service.
Starting with a monolith architecture, in the same year Netflix faced serious problems. Its database was damaged so Netflix was forced to shut down business operations for up to four days.
That’s why Netflix started leveraging the cloud for better product distribution. Since 2009, Netflix has gradually used microservices. Starting from CMS development, logs, play buttons, etc.
After implementing microservices, Netflix managed to meet the high demand for live-streaming services smoothly. This is all done while cutting development and maintenance costs significantly.
2. Amazon
Amazon is an e-commerce platform with 300 million active customers and more than 1.9 million merchants. Amazon’s power to attract that many consumers certainly cannot be separated from the reliability of its web/apps.
Initially, Amazon still used monoliths. However, as the number of consumers and business needs increase, this architecture creates issues in development, code base, and service connectivity.
Finally, Amazon decided to implement microservices so that its various services can run independently.
Not surprisingly, Amazon has several separate development teams to manage buy buttons on product pages, tax calculators, etc.
By building dedicated teams and devolving development authority, Amazon can focus on looking at issues in detail, while solving them more efficiently.
3. Spotify
Spotify uses microservices to keep up with the competition with other streaming services. Because it requires rapid innovation and continuous development, microservices is the right architecture.
Not surprisingly, Spotify has a special team to manage certain features. For example, the search suggestion feature to users has its own development team.
2 comments
Your point of view caught my eye and was very interesting. Thanks. I have a question for you.
Sure , what is your questions?