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

Case study of the good enough architecture

Case study of the good enough architecture

Jakub Kubryński

July 01, 2017
Tweet

More Decks by Jakub Kubryński

Other Decks in Programming

Transcript

  1. @jkubrynski
    CASE STUDY
    OF THE
    GOOD ENOUGH ARCHITECTURE
    JAKUB KUBRYNSKI
    [email protected] / @jkubrynski / kubrynski.com

    View full-size slide

  2. $ WHOAMI
    DEVSKILLER CO-FOUNDER
    BOTTEGA TRAINER
    DEVOXX.PL PROGRAM COMMITTEE MEMBER
    OPEN SOURCE CONTRIBUTOR

    View full-size slide

  3. "Have no fear of perfection - you'll never reach it." ― Salvador Dalí

    View full-size slide

  4. WHAT YOU CAN LEARN
    FROM A STARTUP

    View full-size slide

  5. IS THERE
    A PERFECT
    ARCHITECTURE?

    View full-size slide

  6. FAST FEEDBACK
    AND
    COST-EFFECTIVE

    View full-size slide

  7. 1. MOST ORGANIZATIONS "DO AGILE"
    2. MOST ORGANIZATIONS SHIP NEW FEATURES
    IN MONTHS

    View full-size slide

  8. DON'T DO AGILE.
    BE AGILE!

    View full-size slide

  9. CONTINUOUS DELIVERY

    View full-size slide

  10. RELEASE
    VS
    DEPLOYMENT

    View full-size slide

  11. REGRESSION
    IS TOO EXPENSIVE

    View full-size slide

  12. VERIFY CRITICAL PATHS
    AND LET YOUR USERS DO THE REST

    View full-size slide

  13. BUT...
    CARE ABOUT UNIT TESTS
    AND FIX BUGS AS ASAP AS POSSIBLE

    View full-size slide

  14. MICROSERVICES
    AUTONOMOUS RELEASES
    CLOUD READY
    FAST PIPELINES

    View full-size slide

  15. COMMUNICATION
    IS THE ROOT OF ALL EVIL

    View full-size slide

  16. SLA
    99.9 ^ 10 = 99.0

    View full-size slide

  17. QUALITY
    SHARED MODEL?
    E2E TESTS?

    View full-size slide

  18. CONTRACTS FTW!
    IF A==C && B==C
    THEN A==B

    View full-size slide

  19. SAY NO TO VERSIONING
    BE UP TO DATE

    View full-size slide

  20. PERFORMANCE TESTS
    ARE EVEN MORE EXPENSIVE
    THAN REGRESSION

    View full-size slide

  21. PERFORMANCE TESTS
    CANARY DEPLOYMENTS
    MONITORING

    View full-size slide

  22. MONITORING
    IS THE NEW TESTING

    View full-size slide

  23. MONITORING
    PERFORMANCE
    SYSTEM HEALTH
    EXCEPTIONS

    View full-size slide

  24. METRICS EVERYWHERE
    LIVE BUSINESS INTELLIGENCE
    DATA DRIVEN ORGANIZATION

    View full-size slide

  25. DATA DRIVEN
    MEANS
    ONLY VALUABLE STUFF

    View full-size slide

  26. ANY ACTION IS
    AN INVESTMENT

    View full-size slide

  27. THINK ABOUT
    ROI

    View full-size slide

  28. SAFE TO FAIL
    MINIMIZE IMPACT

    View full-size slide

  29. SAFE TO FAIL
    SELF-HEALING COMMUNICATION

    View full-size slide

  30. SAFE TO FAIL
    INSTANT WARNING

    View full-size slide

  31. SAFE TO FAIL
    ROLLBACK

    View full-size slide

  32. SAFE TO FAIL
    ELIMINATE HUMAN ERRORS

    View full-size slide

  33. REPEATABILITY

    View full-size slide

  34. MACHINES COMPARED TO HUMANS:
    ARE GOOD IN REPEATING TASKS
    ARE EASY TO ESTIMATE
    ARE MUCH CHEAPER

    View full-size slide

  35. AUTOMATE
    TESTS

    View full-size slide

  36. AUTOMATE
    DEPLOYMENTS

    View full-size slide

  37. AUTOMATE
    SETUP

    View full-size slide

  38. AUTOMATE
    INFRASTRUCTURE

    View full-size slide

  39. EVERYTHING IS CODE
    APPLICATION SOURCE
    BUILD JOBS
    DEPLOYMENT PIPELINES
    DEPLOYMENT SCRIPTS
    INFRASTRUCTURE
    OS CONFIGURATION
    APPLICATION PROPERTIES
    RUN BOOKS

    View full-size slide

  40. NO BACKUPS
    * EXCEPT DATA AND GIT

    View full-size slide

  41. MINIMIZE OVERHEAD
    BY
    KEEPING ORDER

    View full-size slide

  42. CONVENTION
    OVER
    CONFIGURATION

    View full-size slide

  43. CONVENTION EXAMPLE
    repository: git.acme.com/repos/{serviceName}.git
    artifactId: target/{serviceName}.jar
    application home: /opt/{serviceName}
    logs: /opt/{serviceName}/logs/service.log
    dashboard:
    grafana.acme.com/dashboard/db/{serviceName}
    public ip: acme-prod-weu-{serviceName}-pip
    loadbalancer: acme-prod-weu-{serviceName}-lb
    VMs: acme-prod-weu-{serviceName}-vm-{i}

    View full-size slide

  44. KEY TAKEAWAYS
    MONITORING
    AUTOMATION
    CONVENTIONS
    CONTINUOUS DELIVERY

    View full-size slide

  45. THANKS
    FOR YOUR PATIENCE

    View full-size slide