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

Re-architect for the Cloud - Cloud Expo Europe

Re-architect for the Cloud - Cloud Expo Europe

Your move to Cloud doesn't have to be lift&shift! You get the most benefits of the Cloud, re-architecting to become "just enough" Cloud-Native is the way to go. Learn more about this approach, illustrated with two little experience reports, and borrowing from Domain-Driven Design with bounded contexts.

Cyrille Martraire

November 17, 2022
Tweet

More Decks by Cyrille Martraire

Other Decks in Programming

Transcript

  1. RÉ-ARCHITECTURER VOTRE EXISTANT POUR MAXIMISER LE BÉNÉFICE DU CLOUD CHALLENGES

    & OPPORTUNITIES @AROLLAFR Cyrille Martraire Marouane Benamara
  2. @arollafr Managing boxes is NOT our CORE expertise! #secure #reliable

    #current #global (It’s someone else’s expertise)
  3. @arollafr We want to deliver new features 3x faster! #time2market

    #self-service-provisioning #pre-approved-budget
  4. SINCE 1999 CYRILLE MARTRAIRE @CYRIUX @AROLLAFR CO-FOUNDER & CTO AROLLA

    DEVELOPER, CONSULTANT, TRAINER FOUNDER PARIS SOFTWARE CRAFTERS SPEAKER & AUTHOR
  5. MAROUANE BENAMARA @CYRIUX @AROLLAFR SENIOR AROLLA DEVELOPER AZURE & AZURE

    SERVERLESS ARCHITECT 10+ YEARS COMMERCIAL EXPERIENCE
  6. FROM ZERO TO DEMO IN 1 MONTH Setup CI/CD (Azure

    Devops): a few days Provisioning Function + DB: one half-day
  7. Homogenous by technical pressure HOMOGENOUS AREAS Requests <<interactive>> <<High-Availability>> <<transactional>>

    <<low-volume>> <<always-on>> Scheduling <<batch>> <<low-downtime>> <<stop&go>> <<optimisation>> <<medium-volume>>
  8. Homogenous by technical pressure HOMOGENOUS AREAS Requests <<interactive>> <<High-Availability>> <<transactional>>

    <<low-volume>> <<always-on>> Scheduling <<batch>> <<low-downtime>> <<stop&go>> <<optimisation>> <<medium-volume>>
  9. Homogenous by technical pressure HOMOGENOUS AREAS Requests <<interactive>> <<High-Availability>> <<transactional>>

    <<low-volume>> <<always-on>> Scheduling <<batch>> <<low-downtime>> <<stop&go>> <<optimisation>> <<medium-volume>>
  10. Homogenous by technical pressure HOMOGENOUS AREAS Requests <<interactive>> <<High-Availability>> <<always-on>>

    <<transactional>> <<low-volume>> Scheduling <<batch>> <<low-downtime>> <<stop&go>> <<optimisation>> <<medium-volume>>
  11. @arollafr FlexRequest Booking Response Partial Response Future Capacity Estimated Flexibility

    Calendar Slot (Asset) Charge Point Demand Response Command Power (state of charge) Telemetry Set Point (target) Estimated Flexibility Calendar Slot Priority Requests <<interactive>> <<High-Availability>> <<fast>> <<transactional>> <<low-volume>> Scheduling <<batch>> <<low-downtime>> <<stop&go>> <<optimisation>> <<medium-volume>> … DOMAIN LANGUAGE!
  12. @arollafr FlexRequest Booking Response Partial Response Future Capacity Estimated Flexibility

    Calendar Slot (Asset) Charge Point Demand Response Command Power (state of charge) Telemetry Set Point (target) Estimated Flexibility Calendar Slot Priority Requests <<interactive>> <<High-Availability>> <<fast>> <<transactional>> <<low-volume>> Scheduling <<batch>> <<low-downtime>> <<stop&go>> <<optimisation>> <<medium-volume>> … CLUSTERS OF WORDS
  13. @arollafr FlexRequest Booking Response Partial Response Future Capacity Estimated Flexibility

    Calendar Slot (Asset) Charge Point Demand Response Command Power (state of charge) Telemetry Set Point (target) Estimated Flexibility Calendar Slot Priority Requests <<interactive>> <<High-Availability>> <<fast>> <<transactional>> <<low-volume>> Scheduling <<batch>> <<low-downtime>> <<stop&go>> <<optimisation>> <<medium-volume>> … SUGGEST SUB-DOMAIN Booking Scheduling
  14. By sub-domain DERIVE THE TECHNICAL PRESSURES Requests <<interactive>> <<High-Availability>> <<always-on>>

    <<transactional>> <<low-volume>> Scheduling <<batch>> <<low-downtime>> <<stop&go>> <<optimisation>> <<medium-volume>>
  15. 58 Value at Stake: growth! Data Volume++ Availability++ (to 99,99%)

    Scalability++ Performance++ Monolith says NO!
  16. Typical On-Premise Legacy Web Server - IIS Windows Services SQL

    Server DB •Deployment requests 48h before •Deployment document to write •Heavyweight process: • 3 approvals, 5 validations • 8 firewalls, 14 hops, 62 proxies to access production machines A legacy monolith A legacy process
  17. Typical On-Premise Legacy Web Server - IIS Windows Services SQL

    Server DB •Recurring performance problems •Almost no monitoring •Regular unplanned downtime
  18. FROM DB-POLLING TO ASYNC QUEUE Front-Of fi ce Back-Of fi

    ce Use data Provide data Serverless bus
  19. Front-Of fi ce Back-Of fi ce APP Services <<PaaS>> Too

    much work/not enough bene fi ts to go full PasS HALF PAAS / HALF IAAS KEEP AS-IS EXTRACT & ADAPT <<IaaS>>
  20. 1- MULTIPLE INSTANCES + SESSIONS = ❤ Front-Of fi ce

    Session state Session state Session state
  21. 2 - BIG QUERIES WORKED ON-PREM Front-Of fi ce SELECT

    p.ID , LAG (p.ID, 1) OVER (ORDER BY p.OwnerUserId DESC) AS PreviousID , LEAD (p.ID, 1) OVER (ORDER BY p.OwnerUserId DESC) AS NextI D FROM Posts p JOIN Users u ON u.Id = p.OwnerUserI d WHERE DisplayName = 'CecilPhillip ' AND p.PostTypeId = 1 AND p.OwnerUserId = 333082 Web Server - IIS Windows Services SQL Server DB Co-colocated
  22. BIG SQL QUERIES TOO SLOW ON PAAS DB Front-Of fi

    ce SELECT p.ID , LAG (p.ID, 1) OVER (ORDER BY p.OwnerUserId DESC) AS PreviousID , LEAD (p.ID, 1) OVER (ORDER BY p.OwnerUserId DESC) AS NextI D FROM Posts p JOIN Users u ON u.Id = p.OwnerUserI d WHERE DisplayName = 'CecilPhillip ' AND p.PostTypeId = 1 AND p.OwnerUserId = 333082 SQL Always-On Cluster
  23. QUICK WINS FOR PERFORMANCE! Azure CDN for big media Replace

    old cache with Azure Redis Cache Cron tasks moved to background jobs Pre-fetch data in read models (caches) via message bus #Cloud-powered
  24. QUICK WINS FOR AUTOMATED DELIVERY! Proving scalability with automated performance

    tests Zero-Downtime deployment with Blue-Green deployment (using built-in Cloud "slots") #Cloud-powered
  25. New type of auction New vehicle-aware search-engine New vehicle-aware search-engine

    (using another, better-suited Cloud service) Business logs streaming Log Storage & Exploitation NEW FEATURES FASTER (FROM NOW ON)
  26. CLOUD = OPTIONS TO GO FASTER Self-Service Provisioning: Try stuff

    yourself No upfront cost: Try stuff cheap API or EVENTS everywhere to plug new stuff easily A lot of ready-made stuff The autonomy to JUST DELIVER with minimal coordination
  27. Back-Office progressively moved to Functions SQL DB progressively replaced by

    PaaS or Serverless storages More async messaging everywhere ONGOING RE-ARCHITECTING, (FROM NOW ON)
  28. @arollafr BIG-SPLIT RE-ARCHITECTING SYNDROME $3M 1 YEAR 7 PEOPLE 100%

    IT4IT SPLIT INTO 5 DOCKER CONTAINERS #wasteful-effort #capex-heavy
  29. @arollafr BIG-SPLIT RE-ARCHITECTING SYNDROME $3M 1 YEAR 7 PEOPLE 100%

    IT4IT SPLIT INTO 5 DOCKER CONTAINERS #wasteful-effort #capex-heavy "Re-architecting sucks"
  30. Ok.

  31. BEWARE CLOUD POISONS! Don’t degrade the time-to-market with process Pre-approved

    budget & own (sub)-account Pre-approved list of cloud services & patterns you can use Self-service provisioning in (no ticketing…) No mandatory technical layer on top of each service
  32. PORTABILITY BY DESIGN AWS SNS S3 Azure Blob Storage Service

    Bus e.g. hexagonal architecture, GUID, decoupling identity management What’s good for testing is also great for portability Dev+Test Test Robot Mocks
  33. LOTS OF SKILLS REQUIRED! Distributed Architecture Tolerant contracts Blue-Green Deployment

    Stateless EDA Correlation ID / GUID Modularity Tech Pressure Areas Bounded Contexts Evolution Pressure Areas Legacy Split Concerns Lazy Loading Large Transactions Temporal Coupling Shared "Uber" DB Migration Concerns Shared auth/ directory Slow queries/join Strangler App+Sync mechanism Cloud- native Patterns Read- models Async everywhere Fast & Reversible Direct Access download /upload Lean but not Naive Frugality Last Responsible Moment Keep Options Open Trying over Thinking Idempotence Extract Repair Rewrite Replace Hexagonal Architecture Change Data Capture Data Polling DB Views
  34. THE RIGHT SKILLS FOR THE RIGHT GROUP Tolerant contracts Blue-Green

    Deployment Stateless EDA Correlation ID / GUID Tech Pressure Areas Bounded Contexts Large Transactions Shared "Uber" DB Strangler App+Sync mechanis m Read- models Direct Access download /upload Last Responsible Moment Keep Options Open Idempotence Extract Repair Rewrite Replace Hexagonal Architecture Change Data Capture Data Polling Group 1 Group 2 Group 3 Tolerant contracts Stateless EDA Correlation ID / GUID
  35. LIFT & SHIFT IS NOT ENOUGH FULL RE-ARCHITECTING IS TOO

    MUCH DDD BOUNDED CONTEXT CAN HELP EMBRACE PAAS/SERVERLESS ASAP TO GO FASTER EVERYTHING!