Lego

Dup, Connect, and Scale Microservices

pipecloud.co

The Evolution of Web Hosting

Virtualization

Containerization

Server

Cloud

Microservices

1st Generation

2nd Generation

3rd Generation

Scaling Nightmares

Dependency Hell

Web hosting has come a long way since the beginning

Microservice Architecture

Continuous Integration & Deployment

Microservices in Production

Truth is stranger than fiction

The Evolution of Web Hosting

Virtualization

Containerization

Server

Cloud

Microservices

1st Generation

2nd Generation

3rd Generation

Scaling Nightmares

Dependency Hell

Service Chaos

Web hosting has come a long way since the beginning

Service Chaos

Image source: https://www.nginx.com/blog/service-discovery-in-a-microservices-architecture​​​

Because service need to find other services at runtime

Dynamically Assigned

Service Discovery

Image source: https://www.nginx.com/blog/service-discovery-in-a-microservices-architecture​​​

Current state of the art

Stores Service Addresses

Address Lookup

To find other services

Short-Term Service Loss

Because services are stateless.

Service Chaos

Short-term service loss at scale

Lego-Like Microservices

Image source: https://www.nginx.com/blog/service-discovery-in-a-microservices-architecture​​​

Eliminates the need for service discovery

Connect

Static

Dynamically Assigned

Dup, Connect, and Scale

Build Stack with Lego 

Hobby

Project

Hobby

Project

lego dup [OPTIONS] SERVICE

Dup

lego dup --name app your_app
lego dup dupper/mongodb
lego dup -p 80:80 dupper/lb
Start App
Start MongoDB
Start Load Balancer
lego connect '[^]SERVICE:PORT[>]@SERVICE[:PORT]'

Connect

lego connect '^mongodb:27017@app'
lego connect 'app:3000>@lb:8080'
lego connect 'mongodb:27017@mongodb'
MongoDB ➙ App
App ➙ Load Balancer
MongoDB ➙ MongoDB

Production

Fault Tolerance

Production

Replica Set

Fault Tolerance

lego scale SERVICE=REPLICAS

Scale

lego scale app=3 mongodb=3 lb=2

Enterprise

High Availibility

Enterprise

Cluster

High Availibility

# Dup
lego dup --name mongodb dupper/mongodb
lego dup --name config dupper/mongodb-config
lego dup --name query dupper/mongodb-query

# Connect Cluster
lego connect query:27020@config query:27020@mongodb
lego connect config:27019@config config:27019@query config:27019@mongodb
lego connect mongodb:27017@mongodb mongodb:27017@query mongodb:27017@config

# Connect Cluster to Application
lego connect '^query:27020>@app:27017'

# Scale
lego scale mongodb=3 config=3 query=2 

Enterprise

Cluster Services
Connect Cluster
Scale Cluster
Setup Cluster

MongoDB Cluster

Questions?

pipecloud.co

Dupper - Lego-Like Microservices

By Ashish Thakwani

Dupper - Lego-Like Microservices

Dup, Connect and Scale your infrastructure with Lego-Like microservices.

  • 343
Loading comments...