Linkerd is an open-source network proxy developed by Buoyant to be installed as a service mesh. Linkerd is one of the first products to be associated with the term service mesh and supports platforms such as Docker and Kubernetes.

In information technology (IT), a service mesh is a dedicated infrastructure layer made to control service-to-service communication and allow separate parts of an application to communicate with each other. Service meshes are typically used in cloud-based applications, containers and microservices.

With up to hundreds of services communicating with each other in a microservices application, it can quickly become confusing to keep track of which services are communicating with each other. Linkerd can be used as a cloud orchestration tool to secure communication between these services by providing features such as load balancing, service discovery, proxy integration and transparency, adaptive routing, failure recovery, circuit breaking and instrumentation.

Linkerd was designed to solve issues related to the operation and management of large applications and systems. Interaction between services is a critical component of an application's runtime behavior. Therefore, by providing a layer of abstraction to control this communication, Linkerd provides developers with more visibility and reliability. Without a dedicated layer of control, it can be difficult to measure and diagnose application problems and failures.

How Linkerd Works

Linkerd runs as a standalone proxy, does not rely on specific languages or libraries and can be used in containers or microservices. The two common deployment models for Linkerd are per-host and as a sidecar.

With per-host deployment, a Linkerd instance can be attached to a physical or virtual host. This then routes all host traffic from each application service instance through the Linkerd instance.

Deploying Linkerd as a sidecar allows one Linkerd instance to be installed per instance of every application service. This is useful for container-based applications. For example, Linkerd can be used in a microservice application that uses Docker containers or Kubernetes pods.

Linkerd can communicate with application services using one of three configurations:

  1. service-to-linker: Each service instance routes traffic through its corresponding Linkerd instance which then handles further traffic rules.
  2. linker-to-service: Linkerd sidecars take and route traffic to the corresponding service instance, rather than service instances receiving traffic directly.
  3. linker-to-linker: A combination of the service-to-linker and linker-to-service configurations that serves incoming traffic with the Linkerd instance which then routes traffic to the corresponding service instance. Then, the service instance routes outgoing traffic back through the Linkerd instance.

Benefits of Linkerd

Benefits of Linkerd include:

  • Simplifies communication between services in both microservices and containers.
  • Makes the process of documenting how parts of an application interact more manageable.
  • Offers higher visibility and control through decoupling communication from the main application code.
  • Gives application managers the ability to address communication and mechanics problems without changing the application itself.
  • Provides common service mesh features such as latency-aware load balancing, service discovery, tracing and instrumentation.
  • Allows providers to choose which coding language is most appropriate for their service.
  • Makes application code more efficient and easier to scale.

Linkerd vs Istio

Istio is an open source service mesh provided by Google, IBM and Lyft. Istio is designed as a universal control plane which was first developed for use with Kubernetes but has expanded to support multiple platforms.

Features provided by Istio include load balancing, identity and key management, fault injection, hybrid deployment, service-to-service authentication, monitoring and logging. Additionally, Istio provides automatic sidecar injection which can add a sidecar proxy to user-created pods.

Although Istio has many features, Istio itself has a steep learning curve and is less user-friendly than Linkerd. For example, the control plane is complicated to configure. However, sticking to default options and settings do make the user experience (UX) less daunting. As a basic service mesh, both Linkerd and Istio are suitable; however, Istio has a larger feature set for more complicated configurations.

This was last updated in January 2019

Continue Reading About Linkerd

Dig Deeper on Containers and virtualization

Software Quality
App Architecture
Cloud Computing
Data Center