500 likes | 775 Views
2013. #GHC13. Systems Architecture at Rapidly Growing Startups. Tracy Chou, Pinterest Barbara Raitz, Airbnb Ketaki Deo, LinkedIn (Pulse) Vida Ha, Square Bethany Macri, Etsy. 2013. The panelists. Tracy Chou. Barbara Raitz. Ketaki Deo. Vida Ha. Bethany Macri. @triketora. @braitz.
E N D
2013 #GHC13 Systems Architecture at Rapidly Growing Startups • Tracy Chou, Pinterest • Barbara Raitz, Airbnb • Ketaki Deo, LinkedIn (Pulse) • Vida Ha, Square • Bethany Macri, Etsy 2013
The panelists Tracy Chou Barbara Raitz Ketaki Deo Vida Ha Bethany Macri @triketora @braitz @kdeo @vidaha @bethanymacri 2013
The basics of setting up a service static assets server API server database server app 2013
How do you scale up? 2013
Splitting up and farming out work static assets server API server database server job queue server app async task workers can offload work from the API servers 2013
Caching data and computation Data access time is often a large percentage of time in serving requests for a database application. Caching is a way of speeding up data access, usually by at least an order of magnitude, by putting information that is expensive to query or compute in a more performant data store. cache server API server database server 2013
“Throwing more machines at the problem” pooling sharding load balancer load balancer code code code code a-g h-m n-s t-z each box has the same information each box has different information 2013
Fitting all the pieces together web client web server cache service API server database service task service mobile app etc. 2013
What is the basic systems architecture at your company? Where are you hosted? 2013
What are the tradeoffs of different languages and frameworks? 2013
What are the tradeoffs of different languages and frameworks? 2013
What major systems architecture decisions has your company made that worked out well, or not? 2013
New user Incoming request Load balancer Web Servers dbindex dbtickets dbshard02 dbshard01 ... dbshardN
New user Incoming request Load balancer
New user Load balancer Web Servers
New user Load balancer Web Servers dbtickets
dbtickets dbtickets01: odd-numbered Primary Keys dbtickets02: even-numbered Primary Keys
New user Load balancer Web Servers dbindex dbtickets
New user Load balancer Web Servers dbindex dbtickets dbshard02 dbshard01 ... dbshardN
dbshards dbshard_02_A dbshard_02_B
New user Incoming request Load balancer Web Servers dbindex dbtickets dbshard02 dbshard01 ... dbshardN
A simple, successful, MVC application The Main App DB 2013
The Main App DB that grows... 2013
+ Features 2013
+ More Features 2013
Supporting Apps & Services 2013
Mobile Clients 2013
Duplicated Code 2013
Creative Routing 2013
A Layered/Tiered Architecture: • small re-usable components • testable => reliability • better for repairing parts without impacting whole • less collision/friction within engineering team • target hardware resources where needed • The Monolithic App: • (mostly) self-contained • does anything/everything The Monolithic App The Monolithic App does not scale 2013
The Service Layer • self-contained units written in language best suited for domain • common interface HTTP + credentials + locale => JSON Service Layer 2013
The API Layer: • re-usable components that can be shared by applications • used to group and decorate results from multiple services • distinguishing characteristics: fetch and format HTTP + credentials + locale => JSON API Layer Service Layer 2013
API Layer Service Layer 2013
The Application Layer: • the front-end features Application Layer API Layer Service Layer 2013
Mobile/Client Layer Routing Layer Authentication Layer Application Layer API Layer Service Layer 2013
Data Tech Benefits Description Application Layer API Layer Service Layer 2013
Data Tech Benefits Description <HTML> • The front-end feature or service Application Layer • business application • view focus RENDR • reusable components that span services • fetch and format • json format focus • Flexible, fast, customized and reusable API Layer JSON over HTTP • Foundational building blocks • Separation allows us to shard and scale • focussed tests, less friction between teams • self-contained domain-specific units • data focus Service Layer JSON over HTTP 2013
How has your engineering team changed and evolved as it has grown? 2013
How has your engineering team changed and evolved as it has grown? 2013
Thanks! Questions? Tracy Chou Barbara Raitz Ketaki Deo Vida Ha Bethany Macri @triketora @braitz @kdeo @vidaha @bethanymacri 2013