the evolution of microservices
play

The Evolution of Microservices Adrian Cockcroft @adrianco - PowerPoint PPT Presentation

The Evolution of Microservices Adrian Cockcroft @adrianco Technology Fellow - Battery Ventures June 2016 What does @adrianco do? Maintain Relationship with Presentations at Technology Due Cloud Vendors Conferences Diligence on Deals


  1. The Evolution of Microservices Adrian Cockcroft @adrianco Technology Fellow - Battery Ventures June 2016

  2. What does @adrianco do? Maintain Relationship with Presentations at Technology Due Cloud Vendors Conferences Diligence on Deals Technical Presentations at @adrianco Advice for Portfolio Companies Companies Program Networking with Committee for Interesting People Tinkering with Conferences Technologies Previously: Netflix, eBay, Sun Microsystems, CCL, TCU London BSc Applied Physics

  3. Agenda Why now? Microservice Architectures What’s Missing? Migration and Simulation What’s Next?

  4. Key Goals of the CIO? Align IT with the business Develop products faster Try not to get breached

  5. Security Blanket Failure Insecure applications hidden behind firewalls make you feel safe until the breach happens… http://peanuts.wikia.com/wiki/Linus'_security_blanket

  6. “Web scale” vs. “Enterprise”

  7. “Webscale” Freedom and responsibility High trust

  8. “Enterprise” Bureaucracy and blame Low trust

  9. How can everyone get speed, low cost, and better usability?

  10. Mixed methods: Disaggregation into microservices helps!

  11. Example Monolith: User Because one Monolithic Sign Home Login part of the application Up Page monolithic application and Complex mix of database holds queries sensitive data all Monolithic of it is subject to Payment Personal “kitchen sink” Reports the most rigorous Method Data database policies @adrianco

  12. Microservices version: User Segregated team owns Segregated team owns secure data sources and rapid improvement of infrequent updates most common use cases Microservices Because each Sign Home Login separation of concerns Up Page microservice can conform to the Isolated single purpose appropriate policy, connections demands for agility can be separated Optimized from requirements Payment Personal Reports datastores Method Data for security @adrianco

  13. In Search of Segmentation Ops Datacenters AWS Accounts AD/LDAP Roles IAM Roles VLAN Networks VPC Security Groups Hypervisor IPtables Calico Policy Docker Links Docker Net/Weave Dev @adrianco

  14. Hierarchical Segmentation AWS Account - Manage across multiple accounts VPC Z - Manage a small number of large network spaces Homepage Team Security Group Reports Team Security Group B C E F A B C D D E F An AWS oriented example… @adrianco containers and links

  15. “You build it, you run it.” Werner Vogels 2006

  16. Developer responsibilities: Faster, cheaper, safer

  17. Speeding Up The Platform Datacenter Snowflakes • Deploy in months • Live for years

  18. Speeding Up The Platform Datacenter Snowflakes Virtualized and Cloud • Deploy in months • Deploy in minutes • Live for years • Live for weeks

  19. Speeding Up The Platform Datacenter Snowflakes Virtualized and Cloud Container Deployments • Deploy in months • Deploy in minutes • Deploy in seconds • Live for years • Live for weeks • Live for minutes/hours

  20. Speeding Up The Platform Datacenter Snowflakes Virtualized and Cloud Container Deployments Lambda Deployments • Deploy in months • Deploy in minutes • Deploy in seconds • Deploy in milliseconds • Live for years • Live for weeks • Live for minutes/hours • Live for seconds

  21. Speeding Up The Platform Datacenter Snowflakes Virtualized and Cloud Container Deployments Lambda Deployments • Deploy in months • Deploy in minutes • Deploy in seconds • Deploy in milliseconds • Live for years • Live for weeks • Live for minutes/hours • Live for seconds AWS Lambda is leading exploration of serverless architectures in 2016

  22. What Happened? Rate of change increased Cost and size and risk of change reduced

  23. Microservices

  24. A Microservice Definition Loosely coupled service oriented architecture with bounded contexts

  25. If every service has to be updated at the same time it’s not loosely coupled A Microservice Definition Loosely coupled service oriented architecture with bounded contexts

  26. If every service has to be updated at the same time it’s not loosely coupled A Microservice Definition Loosely coupled service oriented architecture with bounded contexts If you have to know too much about surrounding services you don’t have a bounded context. See the Domain Driven Design book by Eric Evans.

  27. Microservice Architectures Configuration Observability Tooling Discovery Routing Datastores Operational: Orchestration and Deployment Infrastructure Development: Languages and Container Policy: Architectural and Security Compliance

  28. Next Generation Applications Fill in the gaps, rapidly evolving ecosystem choices Archaius Zipkin Lambda Etcd Compose LaunchDarkly Prometheus Docker Eureka Linkerd Habitat Hystrix Spinnaker Consul Weave Configuration Observability Tooling Discovery Routing Datastores: Orchestrated, Distributed Ephemeral e.g. Cassandra, or DBaaS e.g. DynamoDB Operational: Mesos, Kubernetes, Swarm, Nomad for private clouds. ECS, Mesos, GKS for public Development: components interfaces languages e.g. Docker Hub, Artifactory, Datawire Quark, Go, Rust Policy: Security compliance e.g. Docker Content Trust. Architecture compliance e.g. Cloud Foundry

  29. What could go wrong?

  30. Timeouts and Retries Bad config: Every service defaults to 2 second timeout, two retries Edge Good Good Service Service Service @adrianco

  31. Timeouts and Retries Bad config: Every service defaults to 2 second timeout, two retries Edge Good Good Service Service Service @adrianco

  32. Timeouts and Retries Bad config: Every service defaults to 2 second timeout, two retries Edge Good Good Service Service Service If anything breaks, everything upstream stops responding Edge Overloaded Failed service not Service not Service responding responding @adrianco

  33. Timeouts and Retries Bad config: Every service defaults to 2 second timeout, two retries Edge Good Good Service Service Service If anything breaks, everything upstream stops responding Edge Overloaded Failed service not Service not Service responding responding @adrianco Retries add unproductive work

  34. Timeouts and Retries Budgeted timeout, one retry Edge Good Failed Service Service Service @adrianco

  35. Timeouts and Retries Budgeted timeout, one retry 1s 3s Edge Good Failed 1s Service Service Service Fast fail response after 2s Upstream timeout must always be longer than total downstream timeout * retries delay No unproductive work while fast failing @adrianco

  36. Timeouts and Retries Budgeted timeout, failover retry Failed Edge Good Service Service Service Good Service For replicated services with multiple instances never retry against a failed instance No extra retries or unproductive work @adrianco

  37. Timeouts and Retries Budgeted timeout, failover retry Failed 1s 3s Edge Good Service Service Service Successful response Good delayed 1s Service For replicated services with multiple instances never retry against a failed instance No extra retries or unproductive work @adrianco

  38. Cloud Native Monitoring and Microservices

  39. Interesting architectures have a lot of microservices! Flow visualization is a big challenge. See http://www.slideshare.net/LappleApple/gilt-from-monolith-ruby-app-to-micro-service-scala-service-architecture

  40. Simulated Microservices Denominator DNS Endpoint Model and visualize microservices ELB Load Balancer Simulate interesting architectures Three Generate large scale configurations Availability Zones Eventually stress test real tools Zuul API Proxy Karyon Code: github.com/adrianco/spigo Business Logic Simulate Protocol Interactions in Go Staash Visualize with D3 Data Access Layer See for yourself: http://simianviz.surge.sh Follow @simianviz for updates Priam Cassandra Datastore

  41. Definition of an architecture Header includes See for yourself: http://simianviz.surge.sh/lamp chaos monkey victim { "arch": "lamp", "description":"Simple LAMP stack", "version": "arch-0.0", "victim": "webserver", "services": [ { "name": "rds-mysql", "package": "store", "count": 2, "regions": 1, "dependencies": [] }, { "name": "memcache", "package": "store", "count": 1, "regions": 1, "dependencies": [] }, { "name": "webserver", "package": "monolith", "count": 18, "regions": 1, "dependencies": ["memcache", "rds-mysql"] }, { "name": "webserver-elb", "package": "elb", "count": 0, "regions": 1, "dependencies": ["webserver"] }, { "name": "www", "package": "denominator", "count": 0, "regions": 0, "dependencies": ["webserver-elb"] } ] } New tier Tier List of tier 0 = non Node name package dependencies Regional count

Recommend


More recommend