Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Scaling APIs with Microservices: The Platform.s...

Scaling APIs with Microservices: The Platform.sh Experience

Chris Skene

March 23, 2017
Tweet

More Decks by Chris Skene

Other Decks in Technology

Transcript

  1. Applications built with APIs evolve and get messy... barista makeCoffee

    waiter orderDrinks sommelier getWine kitchen orderMeal updateStock storeroom
  2. Dependency and version management barista makeCoffee waiter orderDrinks sommelier getWine

    kitchen orderMeal updateStock storeroom sommelier storeroom barista
  3. Complete development to production lifecycle Opinionated but flexible, integrates with

    any toolchain, any workflow Multiple applications/containers per project Complete environment for every git branch On-the-fly cloning of production into staging clusters in less than a minute Zero admin chores (it’s not DevOps, its NoOps)
  4. Text Production is an artifact of deployment Describe your environment

    in .platform.app.yaml Commit to Git Push to platform.sh We run your packaging scripts, build your environments, network them, run deploy hooks, and serve the result.
  5. Git-driven orchestration infrastructure • Software changes • Git semantics are

    great for change • When your software changes, your git hash changes • With Platform.sh, when your infrastructure OR software changes, your git hash changes. • Your infrastructure is ALWAYS consistent with your application
  6. Advantages 1. Test in isolation 2. All builds are repeatable

    3. No “production only” bugs 4. Inspect the entire history of your production system 5. Build and release faster 6. Less bugs, less rework*
  7. makeCoffee waiter orderDrinks getW ine kitchen orderMeal updateStock barista barista

    makeCoffee waiter orderDrinks sommelier getW ine kitchen orderMeal updateStock storeroom master barista_feature sommelier storeroom Dependency & testability
  8. barista makeCoffee waiter orderDrinks getW ine kitchen orderMeal updateStock sommelier

    storeroom makeCoffee waiter orderDrinks getW ine kitchen orderMeal updateStock barista barista makeCoffee waiter orderDrinks sommelier getW ine kitchen orderMeal updateStock storeroom master barista_feature sommelier_feature sommelier storeroom Dependency & testability
  9. barista makeCoffee waiter orderDrinks getW ine kitchen orderMeal updateStock sommelier

    storeroom makeCoffee waiter orderDrinks getW ine kitchen orderMeal updateStock barista makeCoffee waiter orderDrinks getW ine kitchen orderMeal updateStock sommelier storeroom barista barista makeCoffee waiter orderDrinks sommelier getW ine kitchen orderMeal updateStock storeroom master barista_feature sommelier_feature integration_test sommelier storeroom Dependency & testability
  10. What does that look like? /project_root /.plaform services.yaml routes.yaml /kitchen

    .platform.app.yaml … code /sommelier .platform.app.yaml … code /waiter .platform.app.yaml … code
  11. Split an API into multiple sub-APIs microcontainers with different dependencies

    and runtimes, all testable User API PHP 5.6 Database Content API PHP 5.7 Image API NodeJS Front controller - NodeJS