Introduction to linkerd
What is linkerd?
What is linkerd?
Service mesh
Distributed applications
What is it actually?
- Layer 5 proxy
- speaks HTTP, Thrift, HTTP/2, gRPC, etc (not raw TCP)
- Deals with requests/responses
- Based on Finagle
- Runs as a sidecar process, nt a library
Ok but why?
- Service discovery
- Load balancing - reduce tail latency
- Retries - improve success rate
- Circuit breakers - improve resilience
- Metrics and Tracing - observability
- Other stuff - transport security, timeouts, deadlines, dynamic routing, per-request routing, ...
Ok but why?
- Network communication is complicated
- Apps shouldn't have to reinvent the wheel
- Libraries are language specific
Service mesh
Client side load balancing
- Power of two choices (P2C): Least Loaded
- Power of two choices (P2C): Peak EWMA
- Aperture: Least Loaded
- Heap: Least loaded
Client side load balancing
How it works
Dtabs (delegation tables)
- lists of routing rules
- take a list of logical paths and transform them to an actual path
- Bullet Three
Namers
- Take the path following them and convert it to an address
- After a namer is run routing is considered complete
Example
/iceCreamStore => /smitten;
/smitten/try => /smittenLocation/waitInLine/thenTry;
/smittenLocation => /sanfrancisco/octavia/432;
/california => /USA/CA;
/sanfrancisco => /california/SF;
/iceCreamStore/try/allFlavors
An actual example
/svc => /#/io.l5d.consul/dc1;
/svc/ubo
Routing in depth
Q
&
A
Thank
You!
Introduction to linkerd
By Alex Bularcă
Introduction to linkerd
- 469