Code Monkey home page Code Monkey logo

systems-talk's People

Watchers

James Cloos avatar

systems-talk's Issues

inter-host communication and service discovery

The following is probably something I've ranted to you at one point or another, but here it is in word form.

I was thinking about my CoreOS cluster, and how I want to do service discovery, high-availability, circuit-breakers, etc. My plan is to run a local proxy on all hosts in the cluster, which I am going to give the incredibly overloaded name of the application router.

The app router will do a lot. I would love to separate concerns more, but I want to minimize the number of network hops involved. The routers job is to route network connections between apps in your cluster.

  1. your app registers what dependencies it requires somewhere (tbd)
  2. for each dependency, the app router uses etcd to resolve where that service resides
  3. a unix domain socket is created named after the service at /services/$NAME.sock

Optionally the app router may setup a persistent TCP connection to the target host ahead of time. When a request comes in, the application should issue a single request to the local unix socket. The router then forwards the request to the remote hosts router, which forwards the request to another unix domain socket.

Only the router deals with network sockets. It might be better to have the router talk directly to an app listening on a public port, but for now I want the flexibility of intercepting requests on both sides.

There are a number of things you can introduce now

  1. Complete network monitoring: the app router can report stats about all incoming/outgoing connections
  2. Latency-monkey: the app routers can slow down your requests to test robustness of the system. You can literally dial in the chaos.
  3. Circuit breakers: the app router can immediately error to applications when downstream latency starts to build up.

The most interesting piece however is that the data center network is now entirely a private interface. The only public interface that applications talk to are unix domain sockets.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.