20
managing scale with lean team leveraging the power of docker and aws

The scaling story of Postman

Embed Size (px)

Citation preview

Page 1: The scaling story of Postman

managing scale with lean team leveraging the power of docker and aws

Page 2: The scaling story of Postman

About Postman

3+ million users

1.5+ million mau

30+ member team

Page 3: The scaling story of Postman

Our Stack27+ micro services

10+ mill peak req/hr140+ gb in/daysailsjs on nodejs

dockermanaged by aws

feb 2017

Page 4: The scaling story of Postman

the story of making small big decisions

postman started 2014 ⇢ small team ⇢ frugal operations

early goal was to ship and validate andspend less time on operations

we were already raking up 500k+ downloads of our chrome app by listening to users and

iterating

Page 5: The scaling story of Postman

the sync serviceenabling api collaboration ⇢ SailsJS

at that time, this was the best framework to choose to go to market fastest

we used whatever minimum the framework needed to get started: one

server, mysql and redis

we were trying to validate that collaborative api development was a solution the world needs

Page 6: The scaling story of Postman

time to choose1.5+ mil users ⇢ steady service adoption (growing

mau)

we knew we needed to make devops easier if we can get any actual development done

at all

walk the tightrope of solving short term problems while following the long term

vision

this meant, larger server, load balancer, constant mysql and redis performance tweaking

on came tedious (and manual) deployment, traffic spikes, hung processes for no apparent

reason

Page 7: The scaling story of Postman

beanstalk + dockersolved all pressing problems ⇢ abstraction to be

flexible

choosing docker (even though we did not need it right away) allowed us to build the things that we expected we might need to (without actually building them at

that time)

we needed to auto scale during load and at that time, we felt aws could give us that quickly

application deployment, infrastructure creation, auto scaling and auto healing all in one package

Page 8: The scaling story of Postman

rds + elasticcacheno more resizing disks ⇢ no more tuning

configurations

reliable and automated backups (and restore), encryption of data communication

and storage and hassle free replication

there could be a million points why rds might appear “limiting”, but we adopted our product development mantra into devops as well and…

Page 9: The scaling story of Postman

near zero downtimehot reboot ⇢ live deployments ⇢ live rollback ⇢ alarms +

auto healing

no need to reboot entire server, just the docker image

build and deploy applications as a secondary image and then swap

we were prototyping faster than ever

fridays were back

Page 10: The scaling story of Postman

developer prepares code and environment, thenci tests code using centrally inherited image

ci tested image is orchestrated into production services by beanstalk

POSTMAN STACK WAS BORN

Page 11: The scaling story of Postman

simple stack workscommon code repository structure

code + tests + beanstalk extensions + dockerfile

we inherited from our own docker base image and that enabled us to control on base stack, easily permeate stack changes into all micro-services and test using production base image

on CI

goal was to make our first micro-service a fully portable concept with all info in code repository

Page 12: The scaling story of Postman

we gave ourselves a 48 hour challengecan you release a new production quality service?

soon we reached 2+ million users and added many more services including api documentation service

and api monitoring service

Page 13: The scaling story of Postman

nginx and beanstalk extensions on ec2

Docker

NodeJS + pm2

SailsJS + Hooks

orm + socket.io & express Business Logic

elastic load balancer

auto scaling group

and other AWS resources

managed by Beanstalk

in an onion shell

Page 14: The scaling story of Postman

time to validate10x traffic ⇢ 5+ live deployments/day ⇢ difficult to

debug

Page 15: The scaling story of Postman

centralised and auto-instrumented

loggingcloudwatch & elk with grafana ⇢ SailsJS hooks

easily added to all service via beanstalk extensions and

docker root image

since we made all services on SailsJS and as such one

hook works everywhere

Page 16: The scaling story of Postman

auto-instrumented monitoring

cloudwatch ⇢ beanstalk enhanced health checks ⇢ beanstalk extensions for custom metrics

with beanstalk extensions, one can customise just about anything and we auto added all our alarms,

instance CPU, memory, disk and event-loop monitoring in no time

grafana did all the reporting for us

Page 17: The scaling story of Postman

dogfooding

Use newman (Postman CLI) for APItesting on CI platforms

Use own monitoring service toperform complex api health checks

Use own API documentation serviceto collaborate micro-service development

Page 18: The scaling story of Postman

up nextcentralised service discovery ⇢ decentralised

message bus ⇢ aws inspector + aws waf + aws shield

Page 19: The scaling story of Postman

in short

Solve short-term problems while accounting for long-term applications

Use containerisation or some other way to find a common entry point and

standardisation of all your services

Don’t spend time solving for operational issues that you might never face

Page 20: The scaling story of Postman

@shamasisgetpostman.com