Tag Archives: linkerd

Evolving Systems Design: From Unreliable rpc to Resilience with Linkerd

This is a talk I gave in May 2018 at KubeCon Copenhagen:

Form3 delivers cloud-based connectivity, payment processing, clearing and settlement services to a wide range of regulated financial institutions. Every transaction in fintech represents real money from real people. Protecting the integrity of service communication here is key. In this talk, I describe how Form3 built a payments platform that is reliable, safe, and resilient. I start by looking at a previous generation system that suffered from unreliable messaging and poor tail latencies. I then cover modern design techniques used to solve those legacy problems. This talk examines how Linkerd is used and deployed to protect financial transactions from failure and latency. Warning this talk contains live demonstrations!

Tagged ,

Linkerd example for consul


tags: [consul, linkerd]

This post looks at how you can configure linkerd to use consul as a service discovery backend

Part of a series on linkerd:
* Part one linkerd and consul

Sample overview

The following components make up the sample system:
* curl which acts as our client application
* linkerd for proxying requests to our service
* audit example service which has a /health endpoint
* consul as our service discovery back-end
* consul-registrator
to automatically registers services with consul

System overview

+--------+      +---------+    +-----------------+
| client +----> | linkerd +--> | service (audit) |
+--------+      +----^----+    +-------+---------+
                     |                 |
                +----+---+     +-------v------------+
                | consul <-----+ consul registrator |
                +--------+     +--------------------+

1. Look up a consul service by path

The sample code for this can be found here: https://github.com/ewilde/linkerd-examples/tree/master/post-1

curl -H "Host: api.company.com" http://localhost:4140/audit/health -i

Should look up the service named audit in the consul catalog and call the service with GET /health

Linkerd configuration

namers:
- kind: io.l5d.consul
  includeTag: false
  useHealthCheck: false
routers:
- protocol: http 
  label: /http-consul
  identifier:
   kind: io.l5d.path
   segments: 1
   consume: true
  dtab: |
    /svc => /#/io.l5d.consul/dc1;
  servers:
  - port: 4140
    ip: 0.0.0.0

2. Look up a consul service by subdomain

curl -H "Host: audit.company.com" http://localhost:4140/health -i

Should look up the service named audit in the consul catalog and call the service with GET /health

Linkerd configuration

namers:
- kind: io.l5d.consul
  includeTag: false
  useHealthCheck: false

routers:
- protocol: http
  label: /host/http-consul
  identifier:
   kind: io.l5d.header.token
  dtab: |
    /consul  => /#/io.l5d.consul/dc1;
    /svc     => /$/io.buoyant.http.subdomainOfPfx/company.com/consul;
  servers:
  - port: 4140
    ip: 0.0.0.0

Written with StackEdit.

Tagged ,