Top Banner
scaling μ- services at gilt [email protected] Microservices Dublin Meetup, Engine Yard, Dublin 24th Feb 2015 Adrian Trenaman, VP Engineering, Gilt
29

Scaling micro services at gilt

Jul 14, 2015

Download

Technology

Adrian Trenaman
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Scaling micro services at gilt

scaling μ-services at [email protected] Dublin Meetup, Engine Yard, Dublin24th Feb 2015

Adrian Trenaman, VP Engineering, Gilt

Page 2: Scaling micro services at gilt

we source luxury brands and lifestyle goods

Page 3: Scaling micro services at gilt

we shoot the product in our studios

Page 4: Scaling micro services at gilt

we receive

Page 5: Scaling micro services at gilt

we sell every day at noon

Page 6: Scaling micro services at gilt

stampede

Page 7: Scaling micro services at gilt

2007 - ruby-on-rails monolith

Page 8: Scaling micro services at gilt

2011: java, scala, loosely-typed services

Hidden linkages; buried business logic

Monolithic Java App; huge bottleneck for innovation.

lots of duplicated code :(

teams focused on business lines

Large loosely-typed JSON/HTTP services

Page 9: Scaling micro services at gilt

enter: µ-services

“How can we arrange our teams around strategic initiatives? How can we make it fast and easy to get to change to production?”

Page 10: Scaling micro services at gilt

2015: micro-services

Page 11: Scaling micro services at gilt

service growth over time: point of inflexion === scala.

Page 12: Scaling micro services at gilt

what are all these services doing?

Page 13: Scaling micro services at gilt

lines of code per service

Page 14: Scaling micro services at gilt

# source files per service

Page 15: Scaling micro services at gilt

# running instances per service

Page 16: Scaling micro services at gilt

from bare-metal...

PHXIAD

Page 17: Scaling micro services at gilt

… to vapour.

Page 18: Scaling micro services at gilt

lift’n’shift + elastic teams

Page 19: Scaling micro services at gilt

AWS instance sizing

Page 20: Scaling micro services at gilt

evolution of architecture and tech organisation

Page 21: Scaling micro services at gilt

Lessen dependencies between teams: faster code-to-prod

Lots of initiatives in parallel

Your favourite <tech/language/framework> here

We (heart) μ-servicesGraceful degradation of service

Disposable Code: easy to innovate, easy to fail and move on.

Page 22: Scaling micro services at gilt

six μ-service challengesno one ever said this was gonna be easy

Page 23: Scaling micro services at gilt

1. stagingWe find it hard to maintain staging environments across multiple teams with lots of services.

We think TiP is the way to go: invest is automation, use dark canaries in prod.

Page 24: Scaling micro services at gilt

2. ownershipWho ‘owns’ that service? What happens if that person goes away?

We have chosen for teams and departments to own and maintain their services. No throwing this stuff over the fence.

Page 25: Scaling micro services at gilt

3. deploymentServices need somewhere to live. We’re building tooling over docker and AWS to give

elasticity + fast provisioning + service isolation + repeatable, immutable deployment.

Page 26: Scaling micro services at gilt

4. lightweight APIsWe’ve settled on REST-style APIs.

Developing http://apidoc.me. Separate interface from implementation; ‘an AVRO for REST” (Mike Bryzek, CTO)

Note: need 'dumb' zero-dependency clients to those APIs.

Page 27: Scaling micro services at gilt

5. audit + alertingHow do we stay compliant while giving engineers full autonomy in prod?

Really smart alerting: http://cavellc.github.io

orders[shipTo: US].count.5m == 0

Page 28: Scaling micro services at gilt

6. io explosionEach service call begets more service calls; some of which are redundant

This is still a worry for us. We currently don’t automatically detect loops.

Page 29: Scaling micro services at gilt

scaling μ-services at [email protected] Dublin Meetup, Engine Yard, Dublin24th Feb 2015

Adrian Trenaman, VP Engineering, Gilt