Diese Präsentation wurde erfolgreich gemeldet.
Wir verwenden Ihre LinkedIn Profilangaben und Informationen zu Ihren Aktivitäten, um Anzeigen zu personalisieren und Ihnen relevantere Inhalte anzuzeigen. Sie können Ihre Anzeigeneinstellungen jederzeit ändern.

Leveraging Amzon EC2 Container Services for Container Orchestration

This is the slides for a talk I gave on AWS EC2 Container Services at AWS + Docker Meetup held @ LinkedIn Bangalore. The video of my presentation can be found at https://youtu.be/GbMGJbDTj-A

  • Loggen Sie sich ein, um Kommentare anzuzeigen.

Leveraging Amzon EC2 Container Services for Container Orchestration

  1. 1. Amazon EC2 Container Service Neeraj Shah Lead | Minjar Cloud Solutions
  2. 2. Agenda for the Demo • What EC2 Container Services offers? • Core Concepts and Terminologies • Container Scheduling • Service Discovery • Cluster Metrics • Tips & Tricks
  3. 3. Challenges with running containers at scale • How to scale-up & scale-down? • Container scheduling • Fault Tolerance • Release image updates reliably • Service Discovery
  4. 4. Container Orchestration
  5. 5. What EC2 Container Services offers • Cloud native container orchestration • Store container images in ECS Container Registry • Works with Docker Hub • Allows pooling of server resources • Dynamic container placement • Auto re-scheduling of failed containers • Comprehensive metrics for resource utilization • Near to zero learning curve
  6. 6. ECS Cluster • Any type of EC2 instances can be added or removed to a cluster • Containers are run as an application fleet or on demand • Containers are placed on servers which has resources available • Provides comprehensive mechanism for container host selection • Supports scaling based on CloudWatch metrics
  7. 7. ECS at High Level Task ECS Cluster Amazon EC2 Amazon EC2 Amazon EC2Amazon EC2 Task TaskDefinition
  8. 8. Task Definitions • A Task Definition is a template for creating and scheduling containers • It Logically groups containers based on their purpose • Task definitions are versioned • Specify CPU & Memory Limits (Hard & Soft)
  9. 9. Task Definitions • Specify Linux ulimits on containers • Schedule containers on instances based on rules e.g. Instance Type or Availability Zone • Networking Mode (Bridge, Host or None) • Map volumes between Host & Container • Created via UI or via API call
  10. 10. Anatomy of Task Definition Docker Image from ECS Registry of Docker Hub Constrains for container placement on a host Host Volumes Network Mode Linux Ulimits Process to execute Parameters CPU Units Memory Hard & Soft Limits Port Mappings Environment Variables Docker Labels Volume Mappings etc hosts Log Driver
  11. 11. Container Scheduling Strategies | Service • Best suited for long running containers • Maintains specified number of running containers on the clusters • Failed containers are re-scheduled • Allows selection of host instances where task can be placed
  12. 12. Container Scheduling Strategies | Manual • Best suited for processes which perform work and then stop e.g. Queue Processor or Batch Jobs • Task containers can be created via RunTask API call • Allows selection of host instances where task can be placed
  13. 13. Container Placement Algorithms • Binpack • Random • Spread • Any combination of above strategies
  14. 14. Service Discovery • AWS Application Load Balancer is a Layer 7 load balancer • ECS Integrates with Application Load Balancer to provide service discovery • Allows multiple copies of same container to run on single host • ECS chooses host port number dynamically from ephemeral port range (32768 to 61000)
  15. 15. Service Discovery | Alternatives • HashiCorp’s Consul • Amazon Route 53
  16. 16. Cluster Metrics • ECS provides CloudWatch metrics for CPU and Memory • CPUReservation / CPUUtilization • MemoryReservation / MemoryUtilization • Running Tasks Count • These metrics can be used to AutoScale containers
  17. 17. Cluster Metrics
  18. 18. Cluster Metrics
  19. 19. Tips & Tricks • Use SpotFleet for processing back ground task or for temporary scale out • Create a frozen AMI with ECS Agent and other artifacts • Tag your instance with Cluster name and run a script during bootup to join a Cluster based on Tag value
  20. 20. neerajx86@gmail.com http://ArtOfCode.io Questions?
  21. 21. Thank You