In this talk, Jeff Valeo from Grubhub will talk about how they leveraged Fastly to slowly migrate user traffic from a legacy monolith to a new, service-based architecture. This solution allowed Grubhub to shift millions of users as new functionality was built with zero downtime.
2. About Grubhub
2
! Grubhub is the nation's leading online and mobile takeout
food-ordering marketplace
! Grubhub, Seamless, AllMenus and MenuPages
! 15.6 million active diners
! More than 420,000 average daily orders
! $1.2 billion gross food sales Q2 2018
3. A Brief History Lesson
3
! May 2013 Grubhub and Seamless merger
! 2 totally independent monoliths (on monoliths)
! .NET & Java
! Self-hosted, single data centers
! Doomsday approaching
4. Phase 1: Consolidation
4
! Consolidated most (will come back to this) users onto the
Grubhub monolith
! One time, ongoing and on-demand diner and data sync
! No traffic cutover yet
5. Phase 2: To The Cloud
5
! Extremely complicated system to move
○ Hyperlocal e-commerce platform
○ Order fulfillment pipeline
○ Restaurant facing technology
○ Accounting
○ Delivery ecosystem
○ Much more
! Building a bridge was key
7. Phase 2: The Bridge
7
! Responsible for bidirectional sync of data
! Only new service with context of legacy monolith (but not
access)
! Direct legacy DB access
! Future proof contracts to an extent
! Built on new frameworks
8. Phase 3: Shifting Traffic
8
! Grubhub was easy
○ Migrate diners
○ Migrate data
○ Release www
○ Release mobile
○ fin
! Seamless only in name...
9. Phase 4: Seamless
9
! Seamless has a large corporate customer base
! Allows large companies to sign up with consolidated billing,
lines of credit, catering, et cetera
! Plan to cut over www.seamless.com to the new platform for
diners but leaving corporate on existing stack
10. Logic At The Edge
10
! Some way to identify intent
! Stick users to an experience
! Use that logic to route to correct backend
14. Current State
14
! Logic still in place to direct to correct stack
! Moved almost everything out of the Grubhub monolith
! Still using the bridge where needed
! Wins in logic at the edge convinced us to add additional
functionality
15. (More) Logic At The Edge
15
! GEO based blocking/logic
○ Allows easy/programmatic whitelisting
! Per POP routing
○ We keep a map of POP → Origin DC in edge dictionary
○ Can shift single POP to alternate origin for traffic balancing
! Rolling fail-out
○ Using per POP routing and knowledge of busiest POPs
safely fail-out an origin DC
! More to come
○ % load shedding
○ Fail-out particular route/services
18. Recap
18
! Building a bridge
! Embracing logic at the edge
! Building custom interaction and display layers where needed
! PS - We’re hiring! jvaleo@grubhub.com