Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Scale-Oriented Architecture with Microservices

John Sheehan
February 10, 2015

Scale-Oriented Architecture with Microservices

A look into how we've built Runscope using a microservice architecture.

John Sheehan

February 10, 2015
Tweet

More Decks by John Sheehan

Other Decks in Technology

Transcript

  1. runscope.com Runscope URLs Identity Request Vault api.runscope.com Eventador Calculon Courier

    Mission Control Passageway go-proxy Warp Pipe go-radar Events Auth Service File Cabinet Script Processor Atlas Archivist Prometheus Billing Scorekeeper
  2. • Service discovery • service://identity/... • Retry failed GETs •

    Run HTTP requests asynchronously • Log with Runscope Traffic Inspector Smart Client
  3. url = "https://ec2-23-212-199-23.us-west-2.amazonaws.com" resp = requests.get(url) if resp.ok: return resp.json()

    else: # retry? return None def get_user(id): def main(): user = get_user(id) print user["name"]
  4. class Identity def get_user(id): url = "service://identity/users/" + id resp

    = smart_client.get(url) if resp.ok: return User(resp.json()) return AnonymousUser() from Identity import get_user def main(): user = get_user(id) print user.name Auto-locate service Smart retries
  5. • Built-in healthcheck/heartbeat endpoints • Automatic, realm-aware service registry •

    Common logging and metrics framework • Simplified dependency management Smart Service