Upload
saul-caganoff
View
803
Download
6
Embed Size (px)
Citation preview
The View from the Peak of Inflated Expectations
Saul CaganoffCTO, Sixtree@scaganoff
MelbourneMicroservicesMeetup
The 2015 Hype Cycle
§ Get away from the “Big Ball of Mud”
§ To go faster
§ Scale Better§ Infinite scalability (beware scale envy)§ Differential scalability
§ Organizing & scaling teams
§ Open up new capabilities§ Evolutionary architectures§ Try new ideas
Core Tenets: Culture Architecture Automation
§ Depending on: Somebody else§ siloed teams: front-ends, back-ends, QA, operations
§ Shared infrastructure§ Shared database creates schema dependencies§ Shared architecture layers – message queues & orchestration§ Other people’s services
§ Shared code – shared libraries, packages, dependency management
§ Expert knowledge – no-one understands the whole system
§ Permission – centralised governance
§ Small Cross-Functional Teams – give the team all they need to deliver business value – two pizza rule
§ Vertical partitioning – partition systems along vertical lines –eschew the horizontally layered architecture
§ Keep services small – so they fit in your head
§ Self-contained code – “a single unix process” (but containers)
§ Loose coupling – choreography vs orchestration
§ Standardise at the interfaces – governance only where its needed
Result: Ownership & Autonomy
§ Collaboration§ Shared Responsibility§ Autonomy§ Quality§ Feedback§ Automation
§ Small Teams§ Segmented on business domain, not technology§ Cross-functional§ Autonomous§ No hand-offs, no blame-shifting
Domain SYSTEM ORGANIZATION
Domain SYSTEM ORGANIZATION
Finance
Sales
Fulfilment
Product
§ Bounded Contexts are areas of cohesion in your domain model§ Boundaries appear where domain
concepts “break”
§ Bounded Contexts are the handle for organizing your§ Application§ Teams§ Runtime services
§ Understand your application’s Bounded Contexts
§ Carve off a small domain (ideally non-transactional)
§ Run as microservices§ Autonomy§ Choreography with rest of the monolith§ Automation: CI/CD
§ Iterate
DON’T§ Still understand your application’s Bounded Contexts
§ But carving up a monolith adds complexity – Stefan Tilkov
§ Security
§ Data Integration & Duplication
§ Monitoring
§ Deployment & Management
§ Service Registration & Discovery
§ Developer Tooling
§ Partitioning
§ (No) Transactions
§ Reporting
§ Data Migration
§ Protocols & Standards
§ Distributed Tracing & Error Handling
§ Failure & Resiliency
§ Standardise all the Interfaces
§ Standard API: REST (ish) or RPC – use a contract!
§ Configuration: Environment Variables
§ Logging: common format to stdout/stderr
§ Monitoring endpoints: /stats or /health
§ Events: publish standard event structures
§ Configuration: environment management
§ Log correlation & tracing: § Shipping and
storage/analytics§ Dapper & Zipkin
§ Monitoring:§ Infrastructure monitoring is
not enough§ End-user experience§ Synthetic transactions
§ Event processing:§ Choreography, CQRS for
reporting
§ Service registration & discovery:§ Load-balancing, failover
§ Orchestration:§ Canary deployments§ Blue/Green Deployments
§ Testing:§ Continuous integration§ Consumer-Driven Contracts
§ Resilience:§ Bulkheads§ Circuit Breakers§ Partial Failure
§ Anti-fragility: extremely difficult to test for emergent behaviours§ Failure Injection§ Simian Army
§ All inclusive or
§ Assemble your own ”best of breed”
Build Test Package Docker Build
DockerRegistry
AnsibleDeploy
K8s Schedule K8s Run Docker Pull K8s
Orchestrate
§ Dozens of Services§ Project setup§ Build & Test§ Artefacts§ Deployment
§ CI and CD are important pre-requisites for microservices
§ Microservices architecture adoption is growing
§ Be judicious in deciding if it’s right for you§ Architecture maturity§ DevOps and automation§ Team size
§ Infrastructure will become easier and more common
§ Culture is the harder thing to change
§ Microservices might just be the new de facto cloud-nativearchitecture ?§ And what about serverless?
§ http://martinfowler.com/microservices/
§ http://microservices.io/patterns/
§ https://www.infoq.com/news/2015/06/monolith-vs-microservices
§ https://eng.uber.com/soa/
§ https://yow.eventer.com/yow-2014-1222/the-odyssey-from-monoliths-to-microservices-at-realestate-com-au-by-beth-skurrie-and-evan-bottcher-and-jon-eaves-1751
§ https://github.com/realestate-com-au/pact
§ https://www.youtube.com/channel/UCeRQROVrFDzKNq4e02ko4cw
§ http://www.meetup.com/Melbourne-Microservices/