From microservices to service mesh: the new era of TARS

The term microservices was introduced in 2005 by Peter Rodgers during a presentation in the Web Services Edge conference. The popularity of microservices is on the rise because it can solve many challenges such as high scalability and high performance. However, as the operational complexity of microservices grows, developers may need to choose a microservices framework that has specific requirements, such as load balancing and scaling, service discovery, and monitoring.

The aforementioned requirements, also called service governance, are not provided by all microservices frameworks and even if it is provided, it might be very hard for companies to enforce service governance if the framework does not support development with multiple programming languages. This is because microservices are built independently by small teams that have the flexibility to choose their own tools and coding languages. TARS, a microservices framework created in 2008 by Tencent, is a framework that currently supports both service governance and multiple programming languages.

After having all services independently developed, service-to-service communication is what makes microservices possible. The problem is that as the application grows, communication gets more and more complex. Thus, even if the communication logic can be coded into each service, it will get chaotic at some point.

To address the communication problem, service mesh was created in 2016. A service mesh is a software infrastructure layer for controlling and monitoring service-to-service communication in microservices applications [17]. The rise of service mesh is tied to the rise of cloud applications. In the cloud native world, an application might consist of hundreds of services, each service might have thousands of instances, and each of those instances might have constantly-changing states as they are dynamically scheduled by an orchestrator (such as Kubernetes). Thus, managing service-to-service communication is vital to ensure performance, reliability, and security. Based on that, service mesh comes into such scenarios and abstracts away all the communication complexities without the need to make any changes to the application.

But, what is the difference between microservices and service mesh?

Service mesh: The solution of the problem

The sidecar design pattern to implement service mesh

The sidecar design pattern consists of deploying a proxy alongside the services in order to implement service mesh. The sidecars abstract the complexity away from the application and handle functionalities like service discovery and load balancing. As you can see in the image below, the service mesh layer connects to a sidecar container that runs alongside the application. Multiple copies of the same sidecar are attached to each microservice.

Image for post
Image for post

The sidecar design pattern. Image extracted from [11].

When should you use TARS and service mesh?

On the other hand, service mesh is still in the early stages of development [9]. Service mesh is a very promising technology, since it uniformly controls the communication traffic across multiple services, and a series of service mesh frameworks through Istio — a service mesh framework — can support service governance [7]. Additionally, by using the sidecar model, Istio can support multiple programming languages [8].

Although TARS has many advantages such as its high performance [12], TARS is a very heavy framework if compared to service mesh. Additionally, TARS might be over complex for beginners. On the other hand, service mesh is easier to understand and probably easier to use. Not having to change the application’s source code makes it definitely easier for development, troubleshooting, and maintenance.

Hence, if you are looking for a more robust microservice architecture with high performance, service governance, and that supports multiple programming languages, then TARS is your best option! If you are looking for a new technology that it is easier to use and to understand but that might not achieve the same performance, then service mesh frameworks are your best shot.

Service mesh in the roadmap of TARS

About the author:

Isabella Ferreira is an Advocate at TARS Foundation, a cloud-native open-source microservice foundation under the Linux Foundation.



















Written by

I'm a PhD Candidate in Computer Engineering at PolyMTL and I'm also an advocate at the TARS Foundation. I'm passionated about open source development!

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store