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

RESPECTING THE MICROSERVICE.

RESPECTING THE MICROSERVICE.

Learning to respect the microservices through experience. We go through lessons learned from multiple scenarios based on Google Cloud

Johann du Toit

February 11, 2020
Tweet

More Decks by Johann du Toit

Other Decks in Programming

Transcript

  1. Johann du Toit GDE Cloud @signedness RESPECTING THE MICROSERVICE. Learning

    to respect the microservices through experience.
  2. qvik.com/monolith Been on a mission On how microservices if done

    right can change organizations for the better, but mostly they are used with any thought on long term
  3. “It's fine to celebrate success but it is more important

    to heed the lessons of failure.” - Bill Gates
  4. • What are microservices? • Lessons learned where it went

    wrong • Lessons learned where it went right • Closing Words and complete list Hopefully have some fun along the way Talking Points For those who love and hate these
  5. Who has had the privilege of working on a code

    base more than 10 years old?
  6. URL Scraping The beginning of the end I was a

    excited and way too positive Lead Developer who wanted to fully embrace microservices
  7. CSS DNS HTML HTTP INSPECT JAVASCRIPT LIGHTHOUSE LINKS MALWARE MOBILE

    NETWORK SEO SOCIAL SPELLCHECK SSL ACCESSIBILITY
  8. CSS DNS HTML HTTP INSPECT JAVASCRIPT LIGHTHOUSE LINKS MALWARE MOBILE

    NETWORK SEO SOCIAL SPELLCHECK SSL ACCESSIBILITY
  9. CSS DNS HTML HTTP INSPECT JAVASCRIPT LIGHTHOUSE LINKS MALWARE MOBILE

    NETWORK SEO SOCIAL SPELLCHECK SSL ACCESSIBILITY
  10. • ... • ... • … • ... • ...

    Let’s explore. Lessons? Quite a few ...
  11. • Not every feature has the right of microservice •

    ... • … • ... • ... Let’s explore. Lessons? Quite a few ...
  12. • Not every feature has the right of microservice •

    Logging becomes very important... • ... • ... • … • ... Let’s explore. Lessons? Quite a few ...
  13. • Not every feature has the right of microservice •

    Logging becomes very important... • The amount of microservices per developer… • ... • … • ... Let’s explore. Lessons? Quite a few ...
  14. • Not every feature has the right of microservice •

    Logging becomes very important... • The amount of microservices per developer… • Shared libraries in a fully microservices architecture points to bad coding practices • … • ... Let’s explore. Lessons? Quite a few ...
  15. • Not every feature has the right of microservice •

    Logging becomes very important... • The amount of microservices per developer… • Shared libraries in a fully microservices architecture points to bad coding practices • Keep track and limit service-to-service calls • ... Let’s explore. Lessons? Quite a few ...
  16. • Not every feature has the right of microservice •

    Logging becomes very important... • The amount of microservices per developer… • Shared libraries in a fully microservices architecture points to bad coding practices • Keep track and limit service-to-service calls • ... Let’s explore. Lessons? Quite a few ...
  17. Service #2 Service #1 Service #4 Service #3 Service #5

    41ms 160m s 67ms 31m s 1.2s 5s 1.3s 300ms ? ? ?
  18. Service #2 Service #1 Service #4 Service #3 Service #5

    41ms 160m s 67ms 31m s 1.2s 5s 1.3s 300ms ? ? ?
  19. • Not every feature has the right of microservice •

    Logging becomes very important... • The amount of microservices per developer… • Shared libraries in a fully microservices architecture points to bad coding practices • Keep track and limit service-to-service calls • Boring is Good™ Let’s explore. Lessons? Quite a few ...
  20. Phase 1 • Migrate fully to Kubernetes/Docker • Setup a

    development workflow develop/master • Setup Standardized Health Checks • Get a good idea of metrics on the site Phase 2 • Create a service to specially deal with speed • Migrate all logic over from monolith to this service • Deployment and benchmarking of service
  21. • ... • ... • ... • ... • ...

    Let’s explore. Lessons? Quite a few ...
  22. • Good Base for development will do wonders • ...

    • ... • ... • ... Let’s explore. Lessons? Quite a few ...
  23. • Good Base for development will do wonders • “Scaling

    Sessions” • ... • ... • ... Let’s explore. Lessons? Quite a few ...
  24. • Good Base for development will do wonders • “Scaling

    Sessions” • Small optimizations add up quickly • ... • ... Let’s explore. Lessons? Quite a few ...
  25. • Good Base for development will do wonders • “Scaling

    Sessions” • Small optimizations add up quickly • Standardized health checks • ... Let’s explore. Lessons? Quite a few ...
  26. • Good Base for development will do wonders • “Scaling

    Sessions” • Small optimizations add up quickly • Standardized health checks • Cronjobs will not be made for running in parallel Let’s explore. Lessons? Quite a few ...
  27. • Not every feature has the right of microservice •

    Distributed logging becomes very important... • The amount of microservices per developer… • Shared libraries in a fully microservices architecture points to bad coding practices • Boring is Good™ • Good Base for development will do wonders • Highly recommend Scaling Sessions • Small optimizations add up quickly • Standardized health checks • Cronjobs will not be made for running in parallel All together make a nice checklist
  28. • Team Size? • State Management? • Consumer Diversity? •

    Logic Dependencies? • Team Expertise? • How does the Workflow? • What metrics are we specially tracking? Questions to ask yourself
  29. As I grow more and more old and grumpy I’ve

    learned to love the monolith and be very careful on when I go the microservice approach.