Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Lightening Talk @Symfony Conference 2016

474 views

Published on

Stephan Schulze, CTO at Berlin-based VC Project A, held a lightening talk about
"Microservice experiences in 7 minutes -
8 questions and our answers to microservices in a 100mio revenue eCommerce business" at Symfony Conference 2016

Published in: Internet
  • Be the first to comment

Lightening Talk @Symfony Conference 2016

  1. 1. Microservice experiences in 7 minutes 8 questions and our answers to microservices in a 100mio revenue eCommerce business 1 Contact: stephan.schulze@project-a.com
  2. 2. 2 1. What are major painpoints of microservices? A microservice architecture is a distributed system. 2 There is: ● an isolated vertical infrastructure for each service ● no referential integrity across services ● no “shared memory” across services ● communication only via APIs
  3. 3. 3 3
  4. 4. 4 2. Micro vs. Macro? rule of thumb: slice rather to large than to small 4 We sliced: business ● Customer ● Order ● Payment ● Checkout ● Contentmanagement ● Products/Search ● Cart ● Calculation ● Search infrastructure ● Rendering/Routing ● Logging ● Authentification ● E-Mails ● Pricing ● Stock
  5. 5. 5 2. Micro vs. Macro? Our architecture 5 R o u ti n g /r e n d e ri n g S1 S5 S2 S6 S4 S7 S9 S3 S8
  6. 6. 6 3. Should I secure my service communication? You must! 6 We use: - encrypted communication between services - token based authorization for services and users - role based access system for services and users
  7. 7. 7 4. What should my services return? In general: everything you want! 7 We return: ● pure JSON or ● full rendered HTML wrapped in JSON with metainformation (Status Codes, Messages, Redirects, …) The question is: Who will merge everything together?
  8. 8. 8 5. What about sessions? Shared data in a distributed system? 8 Our approach: The session ● is managed by the Routing/Rendering service ● is namespaced per service ● is transmitted to a service in the header ● can be updated by the service response
  9. 9. 9 6. What about different service/api versions? You will have different versions of services in production! You will probably have the same service in different versions in production! 9 Our approach: ● services are versioned ● APIs are versioned ● API version can be selected via Header ● APIs are documented via Swagger
  10. 10. 10 7. What about scaling and performance? The application must be built to be scalable! The infrastructure must be built to be scalable! 10 Our approach: ● decided for docker (is a pain for developers on Mac) ● one kubernetes cluster per system ● running on a AWS infrastructure with terraform ● definition of performance budgets for services
  11. 11. 11 8. What else have we learned? ● You need a really good team ● Take time to think and discuss before ● Question whether a microservice architecture is really the way to go 11
  12. 12. Thank you for your attention! Contact: stephan.schulze@project-a.com 12

×