SlideShare uma empresa Scribd logo
1 de 26
@cevoaustralia
@cevoaustralia
Simplifying Amazon ECS by
Weaving overlay networks
Colin Panisset, Cevo
@nonspecialist
@cevoaustralia
Who am I, and why are you here?
“Specialization is for insects” - Robert A. Heinlein
Hear a tale of a journey from innocence to experience?
Learn a bit about containers, networking, and how we dug up
from a tangly mess so that you don’t have to
@cevoaustralia
A quick summary
Docker in 60 seconds (and why)
ECS in 60 seconds
A story of a journey through complexity
Why this is a reasonable thing to do
Power-ups, bells and whistles
Caveats
And live demos (demo gods willing)
@cevoaustralia
Docker in ~60 seconds, and why you should care
Servers VMs Containers Functions
@cevoaustralia
What’s this ECS thing, then?
Container
Orchestration
AWS-integrated
Photo by Guillame Bolduc on Unsplash
@cevoaustralia
Tangled in string (how did we get there???)
Migrating legacy
No re-architecting
Many containers
ECS constraints
Photo by Khara Woods on Unsplash
@cevoaustralia
Our first workaround
“Ambassador”
pattern
Introduced
complexity
Loss of environment
parity
Photo by Luciano Ribas on Unsplash
@cevoaustralia
What other options do we have?
docker-compose
swarm
Kubernetes,
Mesos,
Rancher, …
rewrite ecs-task-kite
DNS-based
discovery
urk … Photo by Ishan @seefromthesky on Unsplash
@cevoaustralia
An example of the ambassador pattern
@cevoaustralia
Unnecessary complexity …
@cevoaustralia
Then, a light!
“weave”!
Open source
Container-
transparent
Fast, resilient …
Photo by Steve Halama on Unsplash
@cevoaustralia
Simplified by weave
@cevoaustralia
Imagine how horrible this would be ...
@cevoaustralia
Mesh networks make routing simple
@cevoaustralia
Yeah, nah
AutoScaling is
your friend!
Public pre-installed
AMI
It’s tricky to set up though, right?
Photo by Austin Neill on Unsplash
@cevoaustralia
Auto-discovery based on AutoScaling groupName
@cevoaustralia
Environment parity
Principle of
least surprise
Reduce risk of
promotion
Support custom or
legacy protocols
Hides complex
network
shenanigans
OK, this is all lovely … but why?
Photo by Emily Morter on Unsplash
@cevoaustralia
Demo o’clock!
@cevoaustralia
But that’s not all, folks!
@cevoaustralia
Connecting
containers
between
Sydney and Tokyo
with zero fuss
or bother
Cross-region demo
Photo by Cristina Munteanu on Unsplash
@cevoaustralia
And more ...
@cevoaustralia
Visibility and control as well
@cevoaustralia
Just because you
can …
Network and
config complexity
beyond MVP
Well-decoupled
systems might not
need it
Existing solutions
may be sufficient
Magic ... but not all unicorns and rainbows
Photo by Annie Spratt on Unsplash
@cevoaustralia
Key takeaways
Useful for dev-test
environment
parity as well as
solving some key
legacy issues
Pretty simple to set
up and use
Free! (speech and
beer)
Photo by Clem Onojeghuo on Unsplash
@cevoaustralia
Thank you - and some references
https://www.weave.works/
https://github.com/weaveworks/weave
https://aws.amazon.com/ecs/
https://unsplash.com/

Mais conteúdo relacionado

Último

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 

Último (20)

TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 

Destaque

How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
ThinkNow
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
 

Destaque (20)

Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
 

LASTconf 2017 - Simplifying Amazon ECS by Weaving overlay networks

Notas do Editor

  1. I’m Colin! I work for Cevo, and we help companies develop and use DevOps mindsets, infrastructure automation, and software delivery process improvements I’ve done many things; I don’t claim to be excellent at any of them, but I’m ok at some of them, and solving interesting problems in novel ways is one thing I’m not bad at. I hope you’re here to hear a bit of a story of discovery, and I hope that when you leave, you’ve either got another tool in your belt for dealing with network complexity in containerised applications, or you’ve at least had a pleasant time listening to me tell everyone else about it. Let’s get cracking
  2. So, no pressure
  3. In the old days, we had physical machines like factories; everything in the one box. If you needed another factory, you had to build one (or buy one). As system power and technology grew, we developed the ability to virtualise factories. One physical box could now host multiple virtual machines, but each VM still runs a complete operating system, with the associated boot times, configuration management challenges, etc. Containers are the next logical step; instead of providing whole-(virtual)-operating system isolation, they provide per-process isolation The step beyond that, Functions-as-a-service (or “serverless”) is not the subject of this talk, but I mention them for completeness No process runs independently of a filesystem, libraries, etc, and that brings versioning and config management challenges; containers provide a fully-resolved artifact that encapsulates versioned dependencies, and give a reasonably consistent interface for config management They simplify immutable infrastructure, development-to-deployment consistency Consistency -> confidence to release -> increase throughput, reduce time-to-value
  4. Containers require orchestration -- where and when to run, connections to other containers, resource constraints, how many to run, restarts, etc … There are many container orchestration frameworks -- Kubernetes, Mesos, Marathon, Rancher, Docker Swarm … ECS is one of them, from Amazon Integrated into the AWS ecosystem, though you could use it outside AWS if you were sufficiently perverse Ok, so now you have the background
  5. Iterative migration of a legacy application; components into containers, containers into ECS, with a goal of automating test environment provisioning, for inclusion in build pipelines. The process of discovery (no one person actually knew how the application worked) resulted in more and more containers, with more coupling between them No ability to re-architect the application One working “stack” of application components -> 35 containers (eeek!) ECS imposes some constraints: “Service” -> multiple “Task Definitions” -> 10 containers per Task Definition Communication between containers in different task definitions can’t use container-name as a hostname! Therefore: communication between task definitions requires some kind of routing or proxying capability.
  6. Used the “ambassador” pattern, as described by the Docker documentation: basically, a proxy container AWS has an “example” one that we tried, called “ecs-task-kite” -- fine for proof of concept, but not supported for prod. Can also only proxy to one service at a time. For smaller, low-complexity systems, this is fine. However, every task definition that had a container that needed to connect to a container in a different task definition, needed an ambassador container; and with the limit of 10 containers per task definition, we saw a rapid explosion in the number of task definitions, and the number of ambassador containers At the point where we had only 23 of our 35 final application components containerised, we were running over 52 containers in ECS Because we didn’t have this limitation on the local system (we were using docker-compose), we had introduced differences between local and ECS-based environments. Exactly the opposite of what we set out to do! So that was clearly inadequate ...
  7. Docker-compose on EC2 would have worked, but changing or updating an already-running system with a different version of a container would have required fragile cleverness Swarm was quite immature, and undergoing some fairly rapid change which meant that we would have been tracking a moving target Organisation had no experience of Kubernetes, Mesos … and poor prior experiences with Rancher … so choosing a different orchestration framework would add complexity, not reduce it We investigated rewriting or extending ecs-task-kite, but limitations of how the application was written (specific ports, etc) would have made it futile We looked at using DNS for service discovery, but poor infrastructure (out of our control or influence) would have introduced unpredictable failures So … were we screwed?
  8. The ambassador container, in this case, ecs-task-kite, first queries the AWS APIs in order to find out the IP address and port of the “actual” container Connections using the local namespace are proxied via the ambassador container to the “actual” destination Some advantages: Destination container could be in another ECS cluster, even potentially in another region; Multiple destination containers could be load-balanced Significant drawbacks: Number of containers goes up, number of ambassadors grows as well API rate limits from AWS become a problem -- and because they are account-wide, one stack can impact others
  9. This slide is about 1 month into the migration to ECS -- the blue bits are load balancer components, the green bits are actual application components, and the red bits are ambassador containers. Ick!
  10. Remembered this thing called “weave” -- encountered it in passing a few years ago, remembered it was some kind of inter-container network thing for Docker It’s Open Source (they have a paid offering based on support, monitoring, and more advanced UI) It’s transparent to containers -- they don’t know it’s there, they can just “magically” connect to another container by name, which means that service discovery is taken care of It’s pretty fast, and it’s resilient to failures
  11. No need for additional “ambassador” containers AWS API rate limits are no longer a problem Same “load balancing” capability via DNS lookups (multiple destination containers of the same name would just return as multiple IP addresses to a single DNS lookup)
  12. … if we didn’t have Weave! There are zero ambassador containers in this diagram
  13. It does clever things to route traffic, so you don’t need hub-and-spoke configurations -- the network is a mesh If there’s a path from one node to another, traffic can flow along it All traffic _within_ a node between containers never goes outside the host -- so it’s fast
  14. It’s not! At least, not for the minimal case using Amazon AutoScaling groups Weave provide an AMI (Amazon Machine Image) free of charge, which is the basic Amazon ECS AMI plus the weave setup steps already configured (it’s about 7 lines of shell script)
  15. Uses tags applied by AutoScaling to find other instances in the same ASG, and creates the overlay network between them If you want to connect instances between different autoscaling groups, just use the weave:peerGroupName tag
  16. It made our ECS configuration look exactly like our docker-compose configuration and we get scale-out DNS-based load balancing for free Keeping local dev and in-cloud dev/test environments (and, eventually, prod) looking the same means that we’re testing the same kind of config that’s being deployed -- risk management Some applications can’t be migrated to AWS because they require custom IP protocols; overlay network enables that Security, encryption, route discovery, NAT traversal -- all taken care of
  17. Everyone loves a live demo! In this one, I’ll show you how two containers, running on two different EC2 instances, can communicate with each other with no special dockery configuration, if they’re on a weave cluster.
  18. Weave allows you to configure mesh networks across more than just instances in the same AWS region. You can: Create networks that span regions, transparent to the containers (with the exception of latency, of course)
  19. You can configure networks that span multiple cloud providers, or are even hybrid-cloud, with a little more work Implications are potentially significant if you want to have cross-cloud data flows for resilience, performance, or any other reason Simple to connect legacy on-prem applications to containerised systems in cloud
  20. ‘Scope’ allows you to monitor the containers in a topology, and interact with them You can monitor connections, workloads, and resource utilisation Scope also allows you to interact with the container in the browser!
  21. Just because you can, doesn’t mean you should Enabler of bad patterns if not watched carefully -- excessive coupling and poor architectures become easy There’s complexity beyond the MVP -- network configuration, cross-cloud and cross-region discovery, and so forth; security and access control require key distribution and credential management systems; this is not unique to Weave, any complex system has these challenges I would not use this: If you don’t need a transparent overlay network -- eg if your system architecture is well-decoupled If your container environment is simple, or you already have a service discovery setup that you like, or is well-established within your team or organisation (the cost of changing must be factored in)
  22. Any questions?