SlideShare une entreprise Scribd logo
1  sur  109
Télécharger pour lire hors ligne
© 2015, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Sumio Okada, Engineer, Sony
Shinya Kawaguchi, Engineer, Sony
October 2015
DVO 312
Building At-Scale Services
with AWS Elastic Beanstalk
Build a Cloud-native Authentication and Profile Management Platform on AWS
What to expect from the session
You will learn how to use AWS Elastic Beanstalk:
• As a platform to easily build customized web application at scale on
AWS.
• To seamlessly build cloud-native applications with other AWS
services.
Agenda
• Introduction
• Architecture
• Implementation
• Conclusion
Introduction
Who are we?
We provide cloud solutions for Sony products and applications.
TV Side View
Smart Tennis Sensor Smart B-Trainer
Play Memories Online
Previous platform
An incident
Previous platform
• Built on the top of IaaS
• Self managed ‘base services’
• Monolithic system
Motivation of rebuild
• Agility
• Robustness
• Efficiency
Achievement - agility
BeforeItem
Deployment time Half a day 40 Min.
Zero downtime release
Release trouble rate 30% 0%
After
Release interval Bi-weekly NA (on demand)
Achievement - robustness
Before AfterItem
Access surges impact Unstable or down No impact
IaaS trouble impact Service damage No impact
Emergency operation Auto recover/healing
Related service down Affecting an entire system Minimum impact
Achievement - efficiency
Before AfterItem
Config management Manual Git (Infrastructure as Code)
7+ self-managed
services
0Infra for management
Scaling Not flexible Auto Scaling
Architecture
Auth & Profile
Mutually independent microservices
Service Providers
Frontend
Backend
Third party
Authentication
Services
Service Providers
Third party
Authentication
Services
Backend
Authentication and profile management system
Frontend
Auth & Profile
System overview
Authentication and profile management system - 1
Public
PublicPrivatePublic
PrivatePublic
AZ-2
us-west2
AZ-1
NAT
NAT
HA
Service Providers
NATAPI
NATAPI
S3
Data Pipeline
Batch
EC2
Resource
Batch
Config
Log
Backup
Profile
DB
DynamoDB
API Call DynamoDB/S3
Route53
Third party
Authentication
Services
System overview
Authentication and profile management system - 2
Public
PublicPrivatePublic
PrivatePublic
AZ-2
us-west2
Route53
AZ-1
S3
Service Providers
API Call DynamoDB/S3
Data Pipeline
Batch
EC2
Resource
NAT
NATAPI
NATAPI
NAT
Batch
Config
Log
Backup
Profile
DB
DynamoDB
HA
Third party
Authentication
Services
us-west2
System overview – CloudFormation
Base layer
Public
PublicPrivatePublic
PrivatePublic
AZ-2
AZ-1
S3
NAT
NAT
Profile
DB
Dynamo DB
CloudFormation
HA
Public
PublicPrivatePublic
PrivatePublic
AZ-2
us-west2
AZ-1
S3
NAT
NAT
Profile
DB
Dynamo DB
HA
System overview - Elastic Beanstalk
Application layer
Elastic Beanstalk
NATAPI
NATAPI
Continuous delivery system
Code Repository
Development
Push Code
3 Build
Kick off
4 Unit Test
5 Push Image
6 Provision & Deploy
7 Sanity Test
Result
Delivery system without self-managed infrastructure
1
2
3
4
6
7
8
Development
QA5 Integration Test5
Get Image
Production
Throttling and Circuit Breaker
Self-defense for robustness
Throttling Circuit Breaker
APIs
Throttling Circuit Breaker
Third party
Authentication
Services
Zero-management infrastructure
EC2
Cloud Watch,
Logs
SNS
S3
Lambda
Redshift
Targets Monitoring
Metrics
Notification / Communication
Log Analysis
Logs
Import
Logs,
Metrics
Implementation
Authentication&
ProfileManagement
Platform
Implementation - motivation
Reproducible
Scalable
Highly available and fault tolerant
Secure and robust
Transparent
Authentication&
ProfileManagement
Platform
Implementation - motivation
Reproducible
Scalable
Highly available and fault tolerant
Secure and robust
Transparent
Infrastructure as code
• Automated operations
• Version control
• Continuous delivery
Infrastructure as code
• Versioning:
• CloudFormation templates
• Elastic Beanstalk configuration files (.ebextensions/*.config)
• Application/environment configuration files
• Automation scripts
Authentication&
ProfileManagement
Platform
Implementation - motivation
Reproducible
Scalable
Highly available and fault tolerant
Secure and robust
Transparent
Auto Scaling based on custom metric
• Custom Metric via Data Pipeline
AppApp
Alarms
ELB Metrics
ELB Metrics
CloudWatch Data Pipeline
Auto Scaling group
Custom Metric
(Successful Response Rate per Instance)
Auto Scaling based on custom metric
• Custom scaling policies via .ebextensions
Resources:
AutoScalingScaleOutPolicy:
Type: AWS::AutoScaling::ScalingPolicy
Properties:
AdjustmentType: ChangeInCapacity
AutoScalingGroupName: { "Ref" : "AWSEBAutoScalingGroup" }
ScalingAdjustment: 2
AutoScalingScaleOutAlarm:
Type: AWS::CloudWatch::Alarm
Properties:
Namespace: { "Fn::GetOptionSetting" : { "OptionName" : "AutoScalingMetricNamespace" } }
MetricName: { "Fn::GetOptionSetting" : { "OptionName" : "AutoScalingMetricName" } }
Dimensions: [ { "Name" : "LoadBalancerName", "Value" : { "Ref" : "AWSEBLoadBalancer" } } ]
...
AlarmActions: [ { "Ref" : "AutoScalingScaleOutPolicy" } ]
Auto Scaling based on custom metric
Disable default scaling policies via .ebextensions
Resources:
AWSEBCloudwatchAlarmHigh:
Type: AWS::CloudWatch::Alarm
Properties:
AlarmActions: [ { "Ref" : "AWS::NoValue" } ]
AWSEBCloudwatchAlarmLow:
Type: AWS::CloudWatch::Alarm
Properties:
AlarmActions: [ { "Ref" : "AWS::NoValue" } ]
Authentication&
ProfileManagement
Platform
Implementation - motivation
Reproducible
Scalable
Highly available and fault tolerant
Secure and robust
Transparent
High availability for application
• Zero downtime deployment
• Auto healing based on deep health check
• Disk space shortage prevention
Zero downtime deployment
Auto Scaling group
• Rolling deployments
• Update application instances one by one
Batch
Batch
Batch
App
Working
App
Working
App
Working
Zero downtime deployment
Auto Scaling group
• Rolling deployments
• Update application instances one by one
Batch
Batch
Batch
App
Working
App
Working
App
Updating
Zero downtime deployment
• Rolling deployments via .ebextensions
option_settings:
"aws:elasticbeanstalk:command":
BatchSizeType: Fixed
BatchSize: 1
Zero downtime deployment
Conflict between rolling deployments and scaling out
• Taken care of by Elastic Beanstalk
Zero downtime deployment
• Rolling updates
• Dynamic batch size
Auto Scaling group
MinSize 2
MaxSize 10
Batch
Batch
App
Working
App
Working
App
Working
App
Working
Increased by
scaling out
Zero downtime deployment
• Rolling updates
• Keep the number of in-service instances
Auto Scaling group
MinSize 2
MaxSize 10
Batch
Batch
App
Working
App
Working
App
Working
App
Working
New
Launching
New
Launching
Zero downtime deployment
• Rolling updates
• Keep the number of in-service instances
Auto Scaling group
MinSize 2
MaxSize 10
BatchApp
Working
App
Working
New
Launching
New
Launching
BatchNew
Working
New
Working
App
Terminating
App
Terminating
Zero downtime deployment
• Rolling updates via .ebextensions
option_settings:
"aws:autoscaling:updatepolicy:rollingupdate":
RollingUpdateEnabled: true
MaxBatchSize: <num of running instances> / 2 # eg.) 2
MinInstancesInService: <num of running instances> # eg.) 4
Zero downtime deployment
Tradeoff
• Rolling deployments/updates
Definite app version switching
Low tolerance to deployment failure (rolling deployments)
Zero downtime deployment
Tradeoff
• Rolling deployments/updates
Definite app version switching
Low tolerance to deployment failure (rolling deployments)
• CNAME swap
High tolerance to deployment failure
DNS propagation
Zero downtime deployment
Tradeoff
• Rolling deployments/updates
Definite app version switching
Low tolerance to deployment failure (rolling deployments)
• CNAME swap
High tolerance to deployment failure
DNS propagation
Auto healing based on deep health check
• Deep health check
• Accuracy of system time
• Accessibility to main database (DynamoDB)
Auto healing based on deep health check
• Deep health check configuration via .ebextensions
option_settings:
"aws:elasticbeanstalk:application":
"Application Healthcheck URL": /1/status
"aws:elb:healthcheck":
Interval: 15
Timeout: 10
HealthyThreshold: 3
UnhealthyThreshold: 3
Auto healing based on deep health check
• Auto healing configuration via .ebextensions
Resources:
AWSEBAutoScalingGroup:
Type: AWS::AutoScaling::AutoScalingGroup
Properties:
HealthCheckType: ELB
Auto healing based on deep health check
Rolling deployments with auto healing configuration
Problem
• Unexpected instance termination caused by Elastic Beanstalk
Auto healing based on deep health check
Rolling deployments with auto healing configuration
Problem
• Unexpected instance termination caused by Elastic Beanstalk
Workaround
• Suspend HealthCheck process in AWSEBAutoScalingGroup
during rolling deployments
Disk space shortage prevention
• Docker image local cache size
0%
20%
40%
60%
80%
100%
1 2 … n
Free
Docker Image Local Cache
System
Rolling Deployments
DiskUsage
Pulling new layers
Disk space shortage prevention
• Remove unused Docker images via .ebextensions
files:
"/opt/elasticbeanstalk/hooks/appdeploy/post/99_01_remove-unused-docker-images.sh":
mode: "000755"
owner: root
group: root
content: |
#!/bin/bash
docker images | grep -v "aws_beanstalk/" | grep -v "REPOSITORY" 
| xargs -I {} /bin/bash -c '
repository=$(echo "{}" | awk "{ print $1 }")
tag=$(echo "{}" | awk "{ print $2 }")
image_id=$(echo "{}" | awk "{ print $3 }")
docker rmi $image_id || docker tag $image_id $repository:$tag || true
' || true
Disk space shortage prevention
• Docker container log size
• Container logs captured by Elastic Beanstalk
• /var/log/eb-docker/containers/eb-current-app/*-stdouterr.log
• Original container logs
• /var/lib/docker/containers/<cid>/<cid>-json.log
Disk space shortage prevention
• Docker container log size
• Container logs captured by Elastic Beanstalk
Rotated
• Original container logs
Keeps growing in size
Disk space shortage prevention
• Docker container logs truncation via .ebextensions
files:
"/etc/cron.hourly/cron.logtruncate.docker.json.log.conf":
mode: "000755"
owner: root
group: root
content: |
#!/bin/sh
# truncate docker container logs here.
# see appendix for the actual script implementation.
...
High availability for NAT
• NAT instance in AutoScalingGroup
• Periodic route table monitoring
NAT instance in AutoScalingGroup
• Static resources created via CloudFormation
Public Subnet
Public Subnet
Private Subnet for Apps
Private Subnet for Apps
AZ-2
AWS Region
AZ-1
tag:NetworkSegment NAT-A
tag:NetworkSegment NAT-B
Internet
MinSize 1
MaxSize 1
MinSize 1
MaxSize 1
NAT instance in AutoScalingGroup
• Dynamic NAT instances
Public Subnet
Public Subnet
Private Subnet for Apps
Private Subnet for Apps
AZ-2
AWS Region
AZ-1
NAT
Pending
NAT
Pending
tag:NetworkSegment NAT-A
Public IP
Internet
tag:NetworkSegment NAT-B
Public IP
tag:NetworkSegment NAT-A
tag:NetworkSegment NAT-B
AutoScalingGroup launches
new NAT instance.
NAT instance in AutoScalingGroup
• Dynamic NAT instance configuration via cloud-init
Public Subnet
Public Subnet
Private Subnet for Apps
Private Subnet for Apps
AZ-2
AWS Region
AZ-1
NAT
Running
NAT
Running
tag:NetworkSegment NAT-A
Elastic IP
Internet
tag:NetworkSegment NAT-B
Elastic IP
tag:NetworkSegment NAT-A
tag:NetworkSegment NAT-B
Disable SRC/DST check,
Assign Elastic IP, etc...
NAT instance in AutoScalingGroup
• Route table lookup
Public Subnet
Public Subnet
Private Subnet for Apps
Private Subnet for Apps
AZ-2
AWS Region
AZ-1
NAT
Running
NAT
Running
Internet
New NAT Instance looks up
route tables based on tag.
tag:NetworkSegment NAT-A
tag:NetworkSegment NAT-B
tag:NetworkSegment NAT-A
Elastic IP
tag:NetworkSegment NAT-B
Elastic IP
NAT Instance in AutoScalingGroup
• Dynamic route configuration
Public Subnet
Public Subnet
Private Subnet for Apps
Private Subnet for Apps
AZ-2
AWS Region
AZ-1
NAT
Running
NAT
Running
tag:NetworkSegment NAT-A
tag:RoutingStatus OK
tag:NetworkSegment NAT-B
tag:RoutingStatus OK
Internet
tag:NetworkSegment NAT-A
Elastic IP
tag:NetworkSegment NAT-B
Elastic IP
Periodic route table monitoring
• Running normally
Public Subnet
Public SubnetPrivate Subnet
Private Subnet
AZ-2
AWS Region
AZ-1
NAT
Running
NATApp
NATApp
NAT
Running
tag:NetworkSegment NAT-A
tag:RoutingStatus OK
tag:NetworkSegment NAT-B
tag:RoutingStatus OK
0.0.0.0/0 Active
tag:NetworkSegment NAT-A
Internet
0.0.0.0/0 Active
tag:NetworkSegment NAT-B
NAT Instances monitor route tables
located in different AZs periodically.
Periodic route table monitoring
• Black hole route detection
Public Subnet
Public SubnetPrivate Subnet
Private Subnet
AZ-2
AWS Region
AZ-1
NAT
Terminated
NATApp
NATApp
NAT
Running
tag:NetworkSegment NAT-A
tag:RoutingStatus OK
tag:NetworkSegment NAT-B
tag:RoutingStatus OK
0.0.0.0/0 Black Hole
tag:NetworkSegment NAT-A
Internet
0.0.0.0/0 Active
tag:NetworkSegment NAT-B
Healthy NAT Instance detects
blackhole internet route.
AWS Region
Periodic route table monitoring
• Outbound traffic takeover
Public Subnet
Public SubnetPrivate Subnet
Private Subnet
AZ-2
AZ-1
NAT
Terminated
NATApp
NATApp
NAT
Running
tag:NetworkSegment NAT-A
tag:RoutingStatus TakenOver
tag:NetworkSegment NAT-B
tag:RoutingStatus OK
Internet
0.0.0.0/0 Active
Healthy NAT Instance takes
over outboud traffic to internet.
tag:NetworkSegment NAT-A
tag:NetworkSegment NAT-B
AWS Region
Periodic route table monitoring
• Outbound traffic takeover
Public Subnet
Public SubnetPrivate Subnet
Private Subnet
AZ-2
AZ-1
NAT
Terminated
NATApp
NATApp
NAT
Running
tag:NetworkSegment NAT-A
tag:RoutingStatus TakenOver
tag:NetworkSegment NAT-B
tag:RoutingStatus OK
Internet
0.0.0.0/0 Active
NAT
Pending
tag:NetworkSegment NAT-A
AutoScalingGroup launches
new NAT instance.
tag:NetworkSegment NAT-B
AWS Region
Periodic route table monitoring
• Route table lookup
Public Subnet
Public SubnetPrivate Subnet
Private Subnet
AZ-2
AZ-1
NAT
Terminated
NATApp
NATApp
NAT
Running
tag:NetworkSegment NAT-A
tag:RoutingStatus TakenOver
tag:NetworkSegment NAT-B
tag:RoutingStatus OK
Internet
0.0.0.0/0 Active
NAT
Running
tag:NetworkSegment NAT-A
tag:NetworkSegment NAT-B
New NAT Instance looks up
route tables based on tag.
AWS Region
Periodic route table monitoring
• Outbound traffic recovery
Public Subnet
Public SubnetPrivate Subnet
Private Subnet
AZ-2
AZ-1
NAT
Terminated
NATApp
NATApp
NAT
Running
tag:NetworkSegment NAT-A
tag:RoutingStatus OK
tag:NetworkSegment NAT-B
tag:RoutingStatus OK
tag:NetworkSegment NAT-B
Internet
0.0.0.0/0 Active
NAT
Running
tag:NetworkSegment NAT-A
New NAT Instance recovers
internet route.
0.0.0.0/0 Active
Periodic route table monitoring
Network capacity planning for NAT instances
• Need to consider total amount of outbound traffic coming
from application instances across Availability Zones
Authentication&
ProfileManagement
Platform
Implementation - motivation
Reproducible
Scalable
Highly available and fault tolerant
Secure and robust
Transparent
Source IP address whitelisting
• Without whitelisting
AWSEBLoadBalancerSecurityGroup
No Inbound Rules
App
App
App
x.x.x.1 x.x.x.6x.x.x.5
Applied by
Elastic Beanstalk
AWSEBLoadBalancer
Source IP address whitelisting
• With whitelisting
ip-whitelist-group1-1
HTTPS TCP 443 x.x.x.1/32 …
AWSEBLoadBalancerSecurityGroup
No Inbound Rules
ip-whitelist-group1-2
HTTPS TCP 443 x.x.x.2/32
ip-whitelist-group1-3
HTTPS TCP 443 x.x.x.3/32
ip-whitelist-group1-4
HTTPS TCP 443 x.x.x.4/32
Configuration
files
tag:IPWhitelistGroup DefaultGroup
tag:IPWhitelistGroup Group1
tag:IPWhitelistGroup Group1
App
App
App
x.x.x.1 x.x.x.6
Rules
Rules
Rules
Rules
x.x.x.5
Applied via script
SecurityGroups
Max 200 (4*50) rules are available
AWSEBLoadBalancer
Add rules
via script
Source IP address whitelisting
• Tagging built-in resources via .ebextensions
Resources:
AWSEBLoadBalancer:
Type: AWS::ElasticLoadBalancing::LoadBalancer
Properties:
Tags:
- { Key: IPWhitelistGroup, Value: Group1 }
AWSEBLoadBalancerSecurityGroup:
Type: AWS::EC2::SecurityGroup
Properties:
GroupDescription: "Load Balancer Security Group"
VpcId: { "Fn::GetOptionSetting" : { "OptionName" : "VPCId" } }
Tags:
- { Key: IPWhitelistGroup, Value: DefaultGroup }
Source IP address whitelisting
Fill required properties in security group for ELB
via .ebextensionsResources:
AWSEBLoadBalancer:
Type: AWS::ElasticLoadBalancing::LoadBalancer
Properties:
Tags:
- { Key: IPWhitelistGroup, Value: Group1 }
AWSEBLoadBalancerSecurityGroup:
Type: AWS::EC2::SecurityGroup
Properties:
GroupDescription: "Load Balancer Security Group"
VpcId: { "Fn::GetOptionSetting" : { "OptionName" : "VPCId" } }
Tags:
- { Key: IPWhitelistGroup, Value: DefaultGroup }
Specifying GroupDescription and VpcId is also required
in order to modify AWSEBLoadBalancerSecurityGroup
resource via .ebextensions.
Connection/request throttling
• Throttling per client (source IP address)
Amazon Linux
Docker Container
App
APIs
Internal
Service
External
Services
Over Limit
Over Limit
Third party
Authentication
Services
Internal
Service
Connection/request throttling
• Throttling per remote user (internal service)
Amazon Linux
Docker Container
External
ServicesOver Limit
Over Limit
Internal
Service
App
APIs
Third party
Authentication
Services
Connection/request throttling
• nginx configuration file installation via .ebextensions
files:
"/etc/nginx/throttling/limit-zone-def.conf":
mode: "000644"
owner: root
group: root
content: |
# include in http context
limit_conn_zone $http_x_forwarded_for zone=conn_perclient:10m;
limit_conn_zone $hostname zone=conn_total:1m;
limit_conn_status 429;
limit_req_zone $remote_user zone=req_perservice:10m rate=150r/s;
limit_req_zone $hostname zone=req_total:1m rate=200r/s;
limit_req_status 429;
Connection/request throttling
• nginx configuration file installation via .ebextensions
files:
"/etc/nginx/throttling/limit-per.conf":
mode: "000644"
owner: root
group: root
content: |
# include in location context
limit_conn conn_perclient 75;
limit_req zone=req_perservice burst=300 nodelay;
Connection/request throttling
• nginx configuration file installation via .ebextensions
files:
"/etc/nginx/throttling/limit-total.conf":
mode: "000644"
owner: root
group: root
content: |
# include in location context
limit_conn conn_total 300;
limit_req zone=req_total burst=400 nodelay;
Connection/request throttling
• nginx configuration script (.ebextensions/nginx-conf.sh)
#!/bin/bash
EB_CONFIG_HTTP_PORT=$(/opt/elasticbeanstalk/bin/get-config container -k instance_port)
cat > /etc/nginx/sites-available/nginx-docker-proxy.conf <<EOF
...
include throttling/limit-zone-def.conf;
server {
listen $EB_CONFIG_HTTP_PORT;
location / {
...
include throttling/limit-per.conf;
include throttling/limit-total.conf;
}
location ~ /.+?/status {
...
include throttling/limit-per.conf;
}
}
EOF
rm -f /etc/nginx/sites-enabled/*
ln -sf /etc/nginx/sites-available/nginx-docker-proxy.conf /etc/nginx/sites-enabled/
Connection/request throttling
• nginx configuration via .ebextensions
container_commands:
nginx-conf-for-throttling:
command: 'bash .ebextensions/nginx-conf.sh'
Connection/request throttling
Tradeoff
Advantages taken from throttling
Low compatibility
External
Services
Internal
Services
Circuit Breaker
• Proxy object for each external service
Amazon Linux
Docker Container
App
Open
Closed
Closed
Closed
APIs
Immediate failure
Third party
Authentication
Services
Authentication&
ProfileManagement
Platform
Implementation - motivation
Reproducible
Scalable
Highly available and fault tolerant
Secure and robust
Transparent
Comprehensive log monitoring
Cloud Watch,
Logs
SNS
S3
Lambda
Redshift
Targets Monitoring
Metrics
Notification / Communication
Log Analysis
Logs
Import
Logs,
Metrics
AppNAT
Comprehensive log monitoring
• LogGroup creation via .ebextensions
Resources:
CWLSyslogMessagesLogGroup:
Type: "AWS::Logs::LogGroup"
DependsOn: AWSEBBeanstalkMetadata
Properties:
LogGroupName: { "Fn::Join" : [ "-", [ { "Ref" : "AWSEBEnvironmentName" },
"syslog-messages" ] ] }
RetentionInDays: 14
Comprehensive log monitoring
• CloudWatch Logs agent config file via .ebextensions
Resources:
AWSEBAutoScalingGroup:
Metadata:
"AWS::CloudFormation::Init":
CWLogsAgentConfigSetup:
files:
"/tmp/cwlogs/conf.d/core-logs.conf":
content : |
[/var/log/messages]
file = /var/log/messages
log_group_name = `{ "Ref" : "CWLSyslogMessagesLogGroup" }`
log_stream_name = {instance_id}
datetime_format = %b %d %H:%M:%S
Notification / Communication
Searchable log retention
Cloud Watch,
Logs
SNS
S3
Lambda
Redshift
Targets Monitoring
Metrics
Log Analysis
Import
Logs,
Metrics
AppNAT
Logs
Notification / Communication
Searchable log retention
Cloud Watch,
Logs
SNS
S3
Lambda
Redshift
Targets Monitoring
Metrics
Log Analysis
Import
Logs,
Metrics
AppNAT
flush_interval 60s
flush_at_shutdown true
Logs
Searchable log retention
• td-agent configuration via .ebextensions
files:
"/etc/sysconfig/td-agent":
mode: "000644"
owner: root
group: root
content: |
# Run as root user
TD_AGENT_ARGS="/usr/sbin/td-agent --group td-agent --log /var/log/td-agent/td-agent.log --use-v1-config 
--suppress-repeated-stacktrace"
DAEMON_ARGS="--user root“
commands:
01-prepare-installer:
command: ... # Install td-agent installation script to /tmp/td-agent/install-td-agent-v2.sh
02-run-installer-td-agent:
command: bash /tmp/td-agent/install-td-agent-v2.sh
03-setup-configration:
command: ... # Configure log sources for td-agent
04-restart-td-agent:
command: service td-agent restart
Searchable log retention
• Enable ELB to upload access logs to Amazon S3
Resources:
AWSEBLoadBalancer:
Type: AWS::ElasticLoadBalancing::LoadBalancer
Properties:
AccessLoggingPolicy:
S3BucketName: { "Fn::GetOptionSetting" : { "OptionName" : "LogsBucketName" } }
S3BucketPrefix: "elb"
Enabled: true
EmitInterval: 5 # minutes
Conclusion
Challenges and expectations
• Compatibility
• Ease of operation test
Trouble-less eight months in production with
Elastic Beanstalk
• Flexibility
Satisfy customization needs
• Reliability
No major problems
• Simplicity
Simplified DevOps
Thank you!
Question and answer
Remember to complete
your evaluations!
Appendix
Sony open source software
• gobreaker
• Go implementation of circuit breaker
• Available on GitHub
• https://github.com/sony/gobreaker
• Feel free to submit pull requests and raise issues on the
GitHub project
Sony open source software
• Sonyflake
• Go implementation of distributed unique ID generator
• Available on GitHub
• https://github.com/sony/sonyflake
• Small utility for AWS (VPC) included
• Example running on EB provided
• Feel free to submit pull requests and raise issues on the
GitHub project
Articles
• Continuous Delivery with Golang and Docker
• https://circleci.com/stories/sony
References
• Advanced network automation
• (ARC401) Black-Belt Networking for the Cloud Ninja | AWS
re:Invent 2014
• Docker container log rotation
• https://github.com/docker/docker/issues/7333
• https://docs.docker.com/reference/logging/overview/
Auto Scaling design
Scale out timing chart
Execute Policy
Running
In ServiceOut of Service
App Startup
ELB Determination
Health Check Grace Period
Deployment
In Service Dead Line Resume Auto Scaling
EC2 State
ELB Instance State
Cooldown Period (scale out policy)
Register Instance
Pending
Auto Scaling
Timers
* in the case of HealthCheckType: ELB
Auto Scaling design
Scale out timing parameters
Execute Policy
Running
In ServiceOut of Service
App Startup
45 ELB Determination
HealthCheck Interval x HealthyThreshold
Health Check Grace Period 600
Deployment
In Service Dead Line Resume Auto Scaling
Margin 300
Margin for
Balancing & Metric
EC2 State
ELB Instance State
Cooldown Period (scale out policy) 900
300 avg.
15 3
300
Register Instance
Pending
Auto Scaling
Timers
* in the case of HealthCheckType: ELB
Examples
• Elastic IP association via cloud-init
#!/bin/bash
REGION=$1
EIP_ALLOCATION_ID=$2
INSTANCE_ID=$(curl --silent http://169.254.169.254/latest/meta-data/instance-id)
while true; do
INSTANCE_STATUS=$(aws --region "${REGION}" --output text 
ec2 describe-instance-status 
--instance-ids "${INSTANCE_ID}" 
--filters Name=instance-state-name,Values=running)
if [[ $? = 0 && "${INSTANCE_STATUS}" != "" ]]; then
aws --region "${REGION}" --output text 
ec2 associate-address --instance-id "${INSTANCE_ID}" 
--allocation-id "${EIP_ALLOCATION_ID}" && break
fi
sleep 5s
done
Examples
• Elastic IP association via cloud-init
• associate-address command fails if the instance is still in
pending state
• Need to wait for the instance to become running state before
executing associate-address command
Examples
• Connection draining
Keep accepting requests (10~20s)
ConnectionDrainingTimeout
Examples
• Connection draining via .ebextensions
option_settings:
"aws:elb:policies":
ConnectionDrainingEnabled: true
ConnectionDrainingTimeout: 80 # 20 + 60 seconds
Examples
• Docker container log truncation
#!/bin/sh
cidfile=$(/opt/elasticbeanstalk/bin/get-config container -k app_deploy_file)
[ ! -r "${cidfile}" ] && exit 0
cid=$(cat "${cidfile}")
scid=${cid::12}
dockerlog="/var/lib/docker/containers/${cid}/${cid}-json.log"
[ ! -w "${dockerlog}" ] && exit 0
# The eb-log file made by Elastic Beanstalk.
eblog="/var/log/eb-docker/containers/eb-current-app/${scid}-stdouterr.log"
# PID of docker logs command related to the Container-ID.
logspids=$(ps aux | grep "docker logs -f ${scid}" | grep -v grep | awk '{print $2}')
for logspid in ${logspids}
do
# Count FD of docker logs related to the eb-log file.
eblogfd=$(lsof -p ${logspid} | grep "${eblog}" | wc -l)
# Expect to be redirected stdout and stderr to the eb-log file.
[ ! ${eblogfd} -eq 2 ] && continue
# Now, can truncate the docker-log file.
cat /dev/null > ${dockerlog}
break
done
Examples
• Run ntpd in slew mode via .ebextensions
files:
"/etc/sysconfig/ntpd":
mode: "000644"
owner: root
group: root
content: |
OPTIONS="-g -x"
commands:
"ntpd-service-restart":
command:
service ntpd restart
Examples
• Scaling event notification via .ebextensions
Resources:
AWSEBAutoScalingGroup:
Type: AWS::AutoScaling::AutoScalingGroup
Properties:
HealthCheckType: ELB
NotificationConfiguration:
TopicARN: { "Fn::GetOptionSetting" : { "OptionName" : “ASGTopicArn" } }
NotificationTypes:
- autoscaling:EC2_INSTANCE_LAUNCH
- autoscaling:EC2_INSTANCE_LAUNCH_ERROR
- autoscaling:EC2_INSTANCE_TERMINATE
- autoscaling:EC2_INSTANCE_TERMINATE_ERROR
Examples
• td-agent installation script
#!/usr/bin/env bash
Enterprise Linux 7 (releasever is '7')
# add GPG key
rpm --import http://packages.treasuredata.com/GPG-KEY-td-agent
# add treasure data repository to yum
cat > /etc/yum.repos.d/td.repo <<EOF
[treasuredata]
name=TreasureData
baseurl=http://packages.treasuredata.com/2/redhat/7/$basearch
gpgcheck=1
gpgkey=http://packages.treasuredata.com/GPG-KEY-td-agent
EOF
# install the toolbelt
yum install -y td-agent-2.1.5-1
# install plugins
/opt/td-agent/embedded/bin/fluent-gem install --no-document fluent-plugin-tail_path -v "=0.0.3"
/opt/td-agent/embedded/bin/fluent-gem install --no-document fluent-plugin-forest -v "=0.3.0"
/opt/td-agent/embedded/bin/fluent-gem install --no-document fluent-plugin-add -v "=0.0.3"
# this plugin will be no longer required in next td-agent version.
/opt/td-agent/embedded/bin/fluent-gem install --no-document fluent-plugin-s3 -v "=0.5.7"
# enable service
chkconfig td-agent on

Contenu connexe

Tendances

AWS Black Belt Online Seminar 2018 Amazon DynamoDB Advanced Design Pattern
AWS Black Belt Online Seminar 2018 Amazon DynamoDB Advanced Design PatternAWS Black Belt Online Seminar 2018 Amazon DynamoDB Advanced Design Pattern
AWS Black Belt Online Seminar 2018 Amazon DynamoDB Advanced Design PatternAmazon Web Services Japan
 
[DO07] マイクロサービスに必要な技術要素はすべて Spring Cloud にある
[DO07] マイクロサービスに必要な技術要素はすべて Spring Cloud にある[DO07] マイクロサービスに必要な技術要素はすべて Spring Cloud にある
[DO07] マイクロサービスに必要な技術要素はすべて Spring Cloud にあるde:code 2017
 
マイクロサービス時代の認証と認可 - AWS Dev Day Tokyo 2018 #AWSDevDay
マイクロサービス時代の認証と認可 - AWS Dev Day Tokyo 2018 #AWSDevDayマイクロサービス時代の認証と認可 - AWS Dev Day Tokyo 2018 #AWSDevDay
マイクロサービス時代の認証と認可 - AWS Dev Day Tokyo 2018 #AWSDevDay都元ダイスケ Miyamoto
 
202205 AWS Black Belt Online Seminar Amazon VPC IP Address Manager (IPAM)
202205 AWS Black Belt Online Seminar Amazon VPC IP Address Manager (IPAM)202205 AWS Black Belt Online Seminar Amazon VPC IP Address Manager (IPAM)
202205 AWS Black Belt Online Seminar Amazon VPC IP Address Manager (IPAM)Amazon Web Services Japan
 
AWS for Games - 게임만을 위한 AWS 서비스 길라잡이 (레벨 200) - 진교선, 솔루션즈 아키텍트, AWS ::: Game...
AWS for Games - 게임만을 위한 AWS 서비스 길라잡이 (레벨 200) - 진교선, 솔루션즈 아키텍트, AWS :::  Game...AWS for Games - 게임만을 위한 AWS 서비스 길라잡이 (레벨 200) - 진교선, 솔루션즈 아키텍트, AWS :::  Game...
AWS for Games - 게임만을 위한 AWS 서비스 길라잡이 (레벨 200) - 진교선, 솔루션즈 아키텍트, AWS ::: Game...Amazon Web Services Korea
 
20200708サーバーレスでのAPI管理の考え方
20200708サーバーレスでのAPI管理の考え方20200708サーバーレスでのAPI管理の考え方
20200708サーバーレスでのAPI管理の考え方Amazon Web Services Japan
 
CloudFront経由でのCORS利用
CloudFront経由でのCORS利用CloudFront経由でのCORS利用
CloudFront経由でのCORS利用Yuta Imai
 
GraphQLのsubscriptionで出来ること
GraphQLのsubscriptionで出来ることGraphQLのsubscriptionで出来ること
GraphQLのsubscriptionで出来ることShingo Fukui
 
AWS Black Belt Online Seminar 2017 Amazon DynamoDB
AWS Black Belt Online Seminar 2017 Amazon DynamoDB AWS Black Belt Online Seminar 2017 Amazon DynamoDB
AWS Black Belt Online Seminar 2017 Amazon DynamoDB Amazon Web Services Japan
 
Hybrid Azure AD Join 動作の仕組みを徹底解説
Hybrid Azure AD Join 動作の仕組みを徹底解説Hybrid Azure AD Join 動作の仕組みを徹底解説
Hybrid Azure AD Join 動作の仕組みを徹底解説Yusuke Kodama
 
AWS Black Belt Online Seminar 2016 AWS CloudFormation
AWS Black Belt Online Seminar 2016 AWS CloudFormationAWS Black Belt Online Seminar 2016 AWS CloudFormation
AWS Black Belt Online Seminar 2016 AWS CloudFormationAmazon Web Services Japan
 
[AWS Start-up ゼミ] よくある課題を一気に解説!〜御社の技術レベルがアップする 2017 夏期講習〜
[AWS Start-up ゼミ] よくある課題を一気に解説!〜御社の技術レベルがアップする 2017 夏期講習〜[AWS Start-up ゼミ] よくある課題を一気に解説!〜御社の技術レベルがアップする 2017 夏期講習〜
[AWS Start-up ゼミ] よくある課題を一気に解説!〜御社の技術レベルがアップする 2017 夏期講習〜Amazon Web Services Japan
 
Java開発の強力な相棒として今すぐ使えるGroovy
Java開発の強力な相棒として今すぐ使えるGroovyJava開発の強力な相棒として今すぐ使えるGroovy
Java開発の強力な相棒として今すぐ使えるGroovyYasuharu Nakano
 
Amazon EKS への道 ~ EKS 再入門 ~
Amazon EKS への道 ~ EKS 再入門 ~Amazon EKS への道 ~ EKS 再入門 ~
Amazon EKS への道 ~ EKS 再入門 ~Hideaki Aoyagi
 
Kinesis + Elasticsearchでつくるさいきょうのログ分析基盤
Kinesis + Elasticsearchでつくるさいきょうのログ分析基盤Kinesis + Elasticsearchでつくるさいきょうのログ分析基盤
Kinesis + Elasticsearchでつくるさいきょうのログ分析基盤Amazon Web Services Japan
 
20210127 今日から始めるイベントドリブンアーキテクチャ AWS Expert Online #13
20210127 今日から始めるイベントドリブンアーキテクチャ AWS Expert Online #1320210127 今日から始めるイベントドリブンアーキテクチャ AWS Expert Online #13
20210127 今日から始めるイベントドリブンアーキテクチャ AWS Expert Online #13Amazon Web Services Japan
 
Amazon Aurora - Auroraの止まらない進化とその中身
Amazon Aurora - Auroraの止まらない進化とその中身Amazon Aurora - Auroraの止まらない進化とその中身
Amazon Aurora - Auroraの止まらない進化とその中身Amazon Web Services Japan
 
モノリスからマイクロサービスへの移行 ~ストラングラーパターンの検証~(Spring Fest 2020講演資料)
モノリスからマイクロサービスへの移行 ~ストラングラーパターンの検証~(Spring Fest 2020講演資料)モノリスからマイクロサービスへの移行 ~ストラングラーパターンの検証~(Spring Fest 2020講演資料)
モノリスからマイクロサービスへの移行 ~ストラングラーパターンの検証~(Spring Fest 2020講演資料)NTT DATA Technology & Innovation
 
kubernetes初心者がKnative Lambda Runtime触ってみた(Kubernetes Novice Tokyo #13 発表資料)
kubernetes初心者がKnative Lambda Runtime触ってみた(Kubernetes Novice Tokyo #13 発表資料)kubernetes初心者がKnative Lambda Runtime触ってみた(Kubernetes Novice Tokyo #13 発表資料)
kubernetes初心者がKnative Lambda Runtime触ってみた(Kubernetes Novice Tokyo #13 発表資料)NTT DATA Technology & Innovation
 

Tendances (20)

AWS Black Belt Online Seminar 2018 Amazon DynamoDB Advanced Design Pattern
AWS Black Belt Online Seminar 2018 Amazon DynamoDB Advanced Design PatternAWS Black Belt Online Seminar 2018 Amazon DynamoDB Advanced Design Pattern
AWS Black Belt Online Seminar 2018 Amazon DynamoDB Advanced Design Pattern
 
[DO07] マイクロサービスに必要な技術要素はすべて Spring Cloud にある
[DO07] マイクロサービスに必要な技術要素はすべて Spring Cloud にある[DO07] マイクロサービスに必要な技術要素はすべて Spring Cloud にある
[DO07] マイクロサービスに必要な技術要素はすべて Spring Cloud にある
 
マイクロサービス時代の認証と認可 - AWS Dev Day Tokyo 2018 #AWSDevDay
マイクロサービス時代の認証と認可 - AWS Dev Day Tokyo 2018 #AWSDevDayマイクロサービス時代の認証と認可 - AWS Dev Day Tokyo 2018 #AWSDevDay
マイクロサービス時代の認証と認可 - AWS Dev Day Tokyo 2018 #AWSDevDay
 
202205 AWS Black Belt Online Seminar Amazon VPC IP Address Manager (IPAM)
202205 AWS Black Belt Online Seminar Amazon VPC IP Address Manager (IPAM)202205 AWS Black Belt Online Seminar Amazon VPC IP Address Manager (IPAM)
202205 AWS Black Belt Online Seminar Amazon VPC IP Address Manager (IPAM)
 
AWS for Games - 게임만을 위한 AWS 서비스 길라잡이 (레벨 200) - 진교선, 솔루션즈 아키텍트, AWS ::: Game...
AWS for Games - 게임만을 위한 AWS 서비스 길라잡이 (레벨 200) - 진교선, 솔루션즈 아키텍트, AWS :::  Game...AWS for Games - 게임만을 위한 AWS 서비스 길라잡이 (레벨 200) - 진교선, 솔루션즈 아키텍트, AWS :::  Game...
AWS for Games - 게임만을 위한 AWS 서비스 길라잡이 (레벨 200) - 진교선, 솔루션즈 아키텍트, AWS ::: Game...
 
20200708サーバーレスでのAPI管理の考え方
20200708サーバーレスでのAPI管理の考え方20200708サーバーレスでのAPI管理の考え方
20200708サーバーレスでのAPI管理の考え方
 
CloudFront経由でのCORS利用
CloudFront経由でのCORS利用CloudFront経由でのCORS利用
CloudFront経由でのCORS利用
 
GraphQLのsubscriptionで出来ること
GraphQLのsubscriptionで出来ることGraphQLのsubscriptionで出来ること
GraphQLのsubscriptionで出来ること
 
AWS Black Belt Online Seminar 2017 Amazon DynamoDB
AWS Black Belt Online Seminar 2017 Amazon DynamoDB AWS Black Belt Online Seminar 2017 Amazon DynamoDB
AWS Black Belt Online Seminar 2017 Amazon DynamoDB
 
Hybrid Azure AD Join 動作の仕組みを徹底解説
Hybrid Azure AD Join 動作の仕組みを徹底解説Hybrid Azure AD Join 動作の仕組みを徹底解説
Hybrid Azure AD Join 動作の仕組みを徹底解説
 
AWS Black Belt Online Seminar 2016 AWS CloudFormation
AWS Black Belt Online Seminar 2016 AWS CloudFormationAWS Black Belt Online Seminar 2016 AWS CloudFormation
AWS Black Belt Online Seminar 2016 AWS CloudFormation
 
Serverless時代のJavaについて
Serverless時代のJavaについてServerless時代のJavaについて
Serverless時代のJavaについて
 
[AWS Start-up ゼミ] よくある課題を一気に解説!〜御社の技術レベルがアップする 2017 夏期講習〜
[AWS Start-up ゼミ] よくある課題を一気に解説!〜御社の技術レベルがアップする 2017 夏期講習〜[AWS Start-up ゼミ] よくある課題を一気に解説!〜御社の技術レベルがアップする 2017 夏期講習〜
[AWS Start-up ゼミ] よくある課題を一気に解説!〜御社の技術レベルがアップする 2017 夏期講習〜
 
Java開発の強力な相棒として今すぐ使えるGroovy
Java開発の強力な相棒として今すぐ使えるGroovyJava開発の強力な相棒として今すぐ使えるGroovy
Java開発の強力な相棒として今すぐ使えるGroovy
 
Amazon EKS への道 ~ EKS 再入門 ~
Amazon EKS への道 ~ EKS 再入門 ~Amazon EKS への道 ~ EKS 再入門 ~
Amazon EKS への道 ~ EKS 再入門 ~
 
Kinesis + Elasticsearchでつくるさいきょうのログ分析基盤
Kinesis + Elasticsearchでつくるさいきょうのログ分析基盤Kinesis + Elasticsearchでつくるさいきょうのログ分析基盤
Kinesis + Elasticsearchでつくるさいきょうのログ分析基盤
 
20210127 今日から始めるイベントドリブンアーキテクチャ AWS Expert Online #13
20210127 今日から始めるイベントドリブンアーキテクチャ AWS Expert Online #1320210127 今日から始めるイベントドリブンアーキテクチャ AWS Expert Online #13
20210127 今日から始めるイベントドリブンアーキテクチャ AWS Expert Online #13
 
Amazon Aurora - Auroraの止まらない進化とその中身
Amazon Aurora - Auroraの止まらない進化とその中身Amazon Aurora - Auroraの止まらない進化とその中身
Amazon Aurora - Auroraの止まらない進化とその中身
 
モノリスからマイクロサービスへの移行 ~ストラングラーパターンの検証~(Spring Fest 2020講演資料)
モノリスからマイクロサービスへの移行 ~ストラングラーパターンの検証~(Spring Fest 2020講演資料)モノリスからマイクロサービスへの移行 ~ストラングラーパターンの検証~(Spring Fest 2020講演資料)
モノリスからマイクロサービスへの移行 ~ストラングラーパターンの検証~(Spring Fest 2020講演資料)
 
kubernetes初心者がKnative Lambda Runtime触ってみた(Kubernetes Novice Tokyo #13 発表資料)
kubernetes初心者がKnative Lambda Runtime触ってみた(Kubernetes Novice Tokyo #13 発表資料)kubernetes初心者がKnative Lambda Runtime触ってみた(Kubernetes Novice Tokyo #13 発表資料)
kubernetes初心者がKnative Lambda Runtime触ってみた(Kubernetes Novice Tokyo #13 発表資料)
 

En vedette

(APP402) Serving Billions of Web Requests Each Day with Elastic Beanstalk | A...
(APP402) Serving Billions of Web Requests Each Day with Elastic Beanstalk | A...(APP402) Serving Billions of Web Requests Each Day with Elastic Beanstalk | A...
(APP402) Serving Billions of Web Requests Each Day with Elastic Beanstalk | A...Amazon Web Services
 
(DVO201) Scaling Your Web Applications with AWS Elastic Beanstalk
(DVO201) Scaling Your Web Applications with AWS Elastic Beanstalk(DVO201) Scaling Your Web Applications with AWS Elastic Beanstalk
(DVO201) Scaling Your Web Applications with AWS Elastic BeanstalkAmazon Web Services
 
(APP202) Deploy, Manage, and Scale Your Apps with AWS OpsWorks and AWS Elasti...
(APP202) Deploy, Manage, and Scale Your Apps with AWS OpsWorks and AWS Elasti...(APP202) Deploy, Manage, and Scale Your Apps with AWS OpsWorks and AWS Elasti...
(APP202) Deploy, Manage, and Scale Your Apps with AWS OpsWorks and AWS Elasti...Amazon Web Services
 
(GAM302) EA's Real-World Hurdles with Millions of Players in the Simpsons: Ta...
(GAM302) EA's Real-World Hurdles with Millions of Players in the Simpsons: Ta...(GAM302) EA's Real-World Hurdles with Millions of Players in the Simpsons: Ta...
(GAM302) EA's Real-World Hurdles with Millions of Players in the Simpsons: Ta...Amazon Web Services
 
AWS re:Invent 2016: The AWS Hero’s Journey to Achieving Autonomous, Self-Heal...
AWS re:Invent 2016: The AWS Hero’s Journey to Achieving Autonomous, Self-Heal...AWS re:Invent 2016: The AWS Hero’s Journey to Achieving Autonomous, Self-Heal...
AWS re:Invent 2016: The AWS Hero’s Journey to Achieving Autonomous, Self-Heal...Amazon Web Services
 
AWS Connectivity, VPC Design and Security Pro Tips
AWS Connectivity, VPC Design and Security Pro TipsAWS Connectivity, VPC Design and Security Pro Tips
AWS Connectivity, VPC Design and Security Pro TipsShiva Narayanaswamy
 
AWS re:Invent 2016: Another Day, Another Billion Packets (NET401)
AWS re:Invent 2016: Another Day, Another Billion Packets (NET401)AWS re:Invent 2016: Another Day, Another Billion Packets (NET401)
AWS re:Invent 2016: Another Day, Another Billion Packets (NET401)Amazon Web Services
 
AWS re:Invent 2016: AWS Mobile State of the Union - Serverless, New User Expe...
AWS re:Invent 2016: AWS Mobile State of the Union - Serverless, New User Expe...AWS re:Invent 2016: AWS Mobile State of the Union - Serverless, New User Expe...
AWS re:Invent 2016: AWS Mobile State of the Union - Serverless, New User Expe...Amazon Web Services
 
Enrich Your DevOps Environment: Tools for Accelerating and Integrating Your A...
Enrich Your DevOps Environment: Tools for Accelerating and Integrating Your A...Enrich Your DevOps Environment: Tools for Accelerating and Integrating Your A...
Enrich Your DevOps Environment: Tools for Accelerating and Integrating Your A...Amazon Web Services
 
DevOps, Continuous Integration and Deployment on AWS
DevOps, Continuous Integration and Deployment on AWSDevOps, Continuous Integration and Deployment on AWS
DevOps, Continuous Integration and Deployment on AWSAmazon Web Services
 
(BDT403) Best Practices for Building Real-time Streaming Applications with Am...
(BDT403) Best Practices for Building Real-time Streaming Applications with Am...(BDT403) Best Practices for Building Real-time Streaming Applications with Am...
(BDT403) Best Practices for Building Real-time Streaming Applications with Am...Amazon Web Services
 
Deploy, Manage, and Scale your Apps with AWS Elastic Beanstalk
Deploy, Manage, and Scale your Apps with AWS Elastic BeanstalkDeploy, Manage, and Scale your Apps with AWS Elastic Beanstalk
Deploy, Manage, and Scale your Apps with AWS Elastic BeanstalkAmazon Web Services
 
AWS re:Invent 2016: Introduction to Amazon CloudFront (CTD205)
AWS re:Invent 2016: Introduction to Amazon CloudFront (CTD205)AWS re:Invent 2016: Introduction to Amazon CloudFront (CTD205)
AWS re:Invent 2016: Introduction to Amazon CloudFront (CTD205)Amazon Web Services
 
DevOps, Common use cases, Architectures, Best Practices
DevOps, Common use cases, Architectures, Best PracticesDevOps, Common use cases, Architectures, Best Practices
DevOps, Common use cases, Architectures, Best PracticesShiva Narayanaswamy
 
AWS Elastic Beanstalk - Running Microservices and Docker
AWS Elastic Beanstalk - Running Microservices and DockerAWS Elastic Beanstalk - Running Microservices and Docker
AWS Elastic Beanstalk - Running Microservices and DockerAmazon Web Services
 
(APP315) Coca-Cola: Migrating to AWS | AWS re:Invent 2014
(APP315) Coca-Cola: Migrating to AWS | AWS re:Invent 2014(APP315) Coca-Cola: Migrating to AWS | AWS re:Invent 2014
(APP315) Coca-Cola: Migrating to AWS | AWS re:Invent 2014Amazon Web Services
 
AWS Black Belt Tech シリーズ 2015 - re:Invent 2015 最新アップデート速報
AWS Black Belt Tech シリーズ 2015 - re:Invent 2015 最新アップデート速報AWS Black Belt Tech シリーズ 2015 - re:Invent 2015 最新アップデート速報
AWS Black Belt Tech シリーズ 2015 - re:Invent 2015 最新アップデート速報Amazon Web Services Japan
 
AWS re:Invent 2016: Building Big Data Applications with the AWS Big Data Plat...
AWS re:Invent 2016: Building Big Data Applications with the AWS Big Data Plat...AWS re:Invent 2016: Building Big Data Applications with the AWS Big Data Plat...
AWS re:Invent 2016: Building Big Data Applications with the AWS Big Data Plat...Amazon Web Services
 

En vedette (20)

(APP402) Serving Billions of Web Requests Each Day with Elastic Beanstalk | A...
(APP402) Serving Billions of Web Requests Each Day with Elastic Beanstalk | A...(APP402) Serving Billions of Web Requests Each Day with Elastic Beanstalk | A...
(APP402) Serving Billions of Web Requests Each Day with Elastic Beanstalk | A...
 
(DVO201) Scaling Your Web Applications with AWS Elastic Beanstalk
(DVO201) Scaling Your Web Applications with AWS Elastic Beanstalk(DVO201) Scaling Your Web Applications with AWS Elastic Beanstalk
(DVO201) Scaling Your Web Applications with AWS Elastic Beanstalk
 
Security Best Practices
Security Best PracticesSecurity Best Practices
Security Best Practices
 
(APP202) Deploy, Manage, and Scale Your Apps with AWS OpsWorks and AWS Elasti...
(APP202) Deploy, Manage, and Scale Your Apps with AWS OpsWorks and AWS Elasti...(APP202) Deploy, Manage, and Scale Your Apps with AWS OpsWorks and AWS Elasti...
(APP202) Deploy, Manage, and Scale Your Apps with AWS OpsWorks and AWS Elasti...
 
(GAM302) EA's Real-World Hurdles with Millions of Players in the Simpsons: Ta...
(GAM302) EA's Real-World Hurdles with Millions of Players in the Simpsons: Ta...(GAM302) EA's Real-World Hurdles with Millions of Players in the Simpsons: Ta...
(GAM302) EA's Real-World Hurdles with Millions of Players in the Simpsons: Ta...
 
AWS re:Invent 2016: The AWS Hero’s Journey to Achieving Autonomous, Self-Heal...
AWS re:Invent 2016: The AWS Hero’s Journey to Achieving Autonomous, Self-Heal...AWS re:Invent 2016: The AWS Hero’s Journey to Achieving Autonomous, Self-Heal...
AWS re:Invent 2016: The AWS Hero’s Journey to Achieving Autonomous, Self-Heal...
 
AWS Connectivity, VPC Design and Security Pro Tips
AWS Connectivity, VPC Design and Security Pro TipsAWS Connectivity, VPC Design and Security Pro Tips
AWS Connectivity, VPC Design and Security Pro Tips
 
AWS re:Invent 2016: Another Day, Another Billion Packets (NET401)
AWS re:Invent 2016: Another Day, Another Billion Packets (NET401)AWS re:Invent 2016: Another Day, Another Billion Packets (NET401)
AWS re:Invent 2016: Another Day, Another Billion Packets (NET401)
 
Deep Dive on Amazon EC2
Deep Dive on Amazon EC2Deep Dive on Amazon EC2
Deep Dive on Amazon EC2
 
AWS re:Invent 2016: AWS Mobile State of the Union - Serverless, New User Expe...
AWS re:Invent 2016: AWS Mobile State of the Union - Serverless, New User Expe...AWS re:Invent 2016: AWS Mobile State of the Union - Serverless, New User Expe...
AWS re:Invent 2016: AWS Mobile State of the Union - Serverless, New User Expe...
 
Enrich Your DevOps Environment: Tools for Accelerating and Integrating Your A...
Enrich Your DevOps Environment: Tools for Accelerating and Integrating Your A...Enrich Your DevOps Environment: Tools for Accelerating and Integrating Your A...
Enrich Your DevOps Environment: Tools for Accelerating and Integrating Your A...
 
DevOps, Continuous Integration and Deployment on AWS
DevOps, Continuous Integration and Deployment on AWSDevOps, Continuous Integration and Deployment on AWS
DevOps, Continuous Integration and Deployment on AWS
 
(BDT403) Best Practices for Building Real-time Streaming Applications with Am...
(BDT403) Best Practices for Building Real-time Streaming Applications with Am...(BDT403) Best Practices for Building Real-time Streaming Applications with Am...
(BDT403) Best Practices for Building Real-time Streaming Applications with Am...
 
Deploy, Manage, and Scale your Apps with AWS Elastic Beanstalk
Deploy, Manage, and Scale your Apps with AWS Elastic BeanstalkDeploy, Manage, and Scale your Apps with AWS Elastic Beanstalk
Deploy, Manage, and Scale your Apps with AWS Elastic Beanstalk
 
AWS re:Invent 2016: Introduction to Amazon CloudFront (CTD205)
AWS re:Invent 2016: Introduction to Amazon CloudFront (CTD205)AWS re:Invent 2016: Introduction to Amazon CloudFront (CTD205)
AWS re:Invent 2016: Introduction to Amazon CloudFront (CTD205)
 
DevOps, Common use cases, Architectures, Best Practices
DevOps, Common use cases, Architectures, Best PracticesDevOps, Common use cases, Architectures, Best Practices
DevOps, Common use cases, Architectures, Best Practices
 
AWS Elastic Beanstalk - Running Microservices and Docker
AWS Elastic Beanstalk - Running Microservices and DockerAWS Elastic Beanstalk - Running Microservices and Docker
AWS Elastic Beanstalk - Running Microservices and Docker
 
(APP315) Coca-Cola: Migrating to AWS | AWS re:Invent 2014
(APP315) Coca-Cola: Migrating to AWS | AWS re:Invent 2014(APP315) Coca-Cola: Migrating to AWS | AWS re:Invent 2014
(APP315) Coca-Cola: Migrating to AWS | AWS re:Invent 2014
 
AWS Black Belt Tech シリーズ 2015 - re:Invent 2015 最新アップデート速報
AWS Black Belt Tech シリーズ 2015 - re:Invent 2015 最新アップデート速報AWS Black Belt Tech シリーズ 2015 - re:Invent 2015 最新アップデート速報
AWS Black Belt Tech シリーズ 2015 - re:Invent 2015 最新アップデート速報
 
AWS re:Invent 2016: Building Big Data Applications with the AWS Big Data Plat...
AWS re:Invent 2016: Building Big Data Applications with the AWS Big Data Plat...AWS re:Invent 2016: Building Big Data Applications with the AWS Big Data Plat...
AWS re:Invent 2016: Building Big Data Applications with the AWS Big Data Plat...
 

Similaire à (DVO312) Sony: Building At-Scale Services with AWS Elastic Beanstalk

Automate Best Practices and Operational Health for your AWS Resources
Automate Best Practices and Operational Health for your AWS ResourcesAutomate Best Practices and Operational Health for your AWS Resources
Automate Best Practices and Operational Health for your AWS ResourcesAmazon Web Services
 
Migration of Microsoft Workloads
Migration of Microsoft WorkloadsMigration of Microsoft Workloads
Migration of Microsoft WorkloadsAmazon Web Services
 
Build an App on AWS for Your First 10 Million Users
Build an App on AWS for Your First 10 Million UsersBuild an App on AWS for Your First 10 Million Users
Build an App on AWS for Your First 10 Million UsersAmazon Web Services
 
AWS re:Invent 2016: Born in the Cloud; Built Like a Startup (ARC205)
AWS re:Invent 2016: Born in the Cloud; Built Like a Startup (ARC205)AWS re:Invent 2016: Born in the Cloud; Built Like a Startup (ARC205)
AWS re:Invent 2016: Born in the Cloud; Built Like a Startup (ARC205)Amazon Web Services
 
Continuous Integration and Deployment Best Practices on AWS
Continuous Integration and Deployment Best Practices on AWSContinuous Integration and Deployment Best Practices on AWS
Continuous Integration and Deployment Best Practices on AWSAmazon Web Services
 
Build an app on aws for your first 10 million users (2)
Build an app on aws for your first 10 million users (2)Build an app on aws for your first 10 million users (2)
Build an app on aws for your first 10 million users (2)AWS Vietnam Community
 
Managing Your Application Lifecycle on AWS: Continuous Integration and Deploy...
Managing Your Application Lifecycle on AWS: Continuous Integration and Deploy...Managing Your Application Lifecycle on AWS: Continuous Integration and Deploy...
Managing Your Application Lifecycle on AWS: Continuous Integration and Deploy...Amazon Web Services
 
Best Practices for Security at Scale
Best Practices for Security at ScaleBest Practices for Security at Scale
Best Practices for Security at ScaleAmazon Web Services
 
Day 3 - DevOps Culture - Continuous Integration & Continuous Deployment on th...
Day 3 - DevOps Culture - Continuous Integration & Continuous Deployment on th...Day 3 - DevOps Culture - Continuous Integration & Continuous Deployment on th...
Day 3 - DevOps Culture - Continuous Integration & Continuous Deployment on th...Amazon Web Services
 
Migration of Microsoft Workloads
Migration of Microsoft WorkloadsMigration of Microsoft Workloads
Migration of Microsoft WorkloadsAmazon Web Services
 
Build a Website on AWS for Your First 10 Million Users
Build a Website on AWS for Your First 10 Million UsersBuild a Website on AWS for Your First 10 Million Users
Build a Website on AWS for Your First 10 Million UsersAmazon Web Services
 
Increase Speed and Agility with Amazon Web Services
Increase Speed and Agility with Amazon Web ServicesIncrease Speed and Agility with Amazon Web Services
Increase Speed and Agility with Amazon Web ServicesAmazon Web Services
 
Increase Speed and Agility with Amazon Web Services
Increase Speed and Agility with Amazon Web ServicesIncrease Speed and Agility with Amazon Web Services
Increase Speed and Agility with Amazon Web ServicesAmazon Web Services
 
Security Best Practices_John Hildebrandt
Security Best Practices_John HildebrandtSecurity Best Practices_John Hildebrandt
Security Best Practices_John HildebrandtHelen Rogers
 
Build an App on AWS for Your First 10 Million Users
Build an App on AWS for Your First 10 Million UsersBuild an App on AWS for Your First 10 Million Users
Build an App on AWS for Your First 10 Million UsersAmazon Web Services
 
AWS re:Invent 2016: Infrastructure Continuous Delivery Using AWS CloudFormati...
AWS re:Invent 2016: Infrastructure Continuous Delivery Using AWS CloudFormati...AWS re:Invent 2016: Infrastructure Continuous Delivery Using AWS CloudFormati...
AWS re:Invent 2016: Infrastructure Continuous Delivery Using AWS CloudFormati...Amazon Web Services
 
Microsoft SQL Server Dive Deep.pdf
Microsoft SQL Server Dive Deep.pdfMicrosoft SQL Server Dive Deep.pdf
Microsoft SQL Server Dive Deep.pdfAmazon Web Services
 
Deep Dive on Microservices and Amazon ECS
Deep Dive on Microservices and Amazon ECSDeep Dive on Microservices and Amazon ECS
Deep Dive on Microservices and Amazon ECSAmazon Web Services
 
Agile Deployment using Git and AWS Elastic Beanstalk
Agile Deployment using Git and AWS Elastic BeanstalkAgile Deployment using Git and AWS Elastic Beanstalk
Agile Deployment using Git and AWS Elastic BeanstalkAmazon Web Services
 

Similaire à (DVO312) Sony: Building At-Scale Services with AWS Elastic Beanstalk (20)

Automate Best Practices and Operational Health for your AWS Resources
Automate Best Practices and Operational Health for your AWS ResourcesAutomate Best Practices and Operational Health for your AWS Resources
Automate Best Practices and Operational Health for your AWS Resources
 
How Easy to Automate Application Deployment on AWS
How Easy to Automate Application Deployment on AWSHow Easy to Automate Application Deployment on AWS
How Easy to Automate Application Deployment on AWS
 
Migration of Microsoft Workloads
Migration of Microsoft WorkloadsMigration of Microsoft Workloads
Migration of Microsoft Workloads
 
Build an App on AWS for Your First 10 Million Users
Build an App on AWS for Your First 10 Million UsersBuild an App on AWS for Your First 10 Million Users
Build an App on AWS for Your First 10 Million Users
 
AWS re:Invent 2016: Born in the Cloud; Built Like a Startup (ARC205)
AWS re:Invent 2016: Born in the Cloud; Built Like a Startup (ARC205)AWS re:Invent 2016: Born in the Cloud; Built Like a Startup (ARC205)
AWS re:Invent 2016: Born in the Cloud; Built Like a Startup (ARC205)
 
Continuous Integration and Deployment Best Practices on AWS
Continuous Integration and Deployment Best Practices on AWSContinuous Integration and Deployment Best Practices on AWS
Continuous Integration and Deployment Best Practices on AWS
 
Build an app on aws for your first 10 million users (2)
Build an app on aws for your first 10 million users (2)Build an app on aws for your first 10 million users (2)
Build an app on aws for your first 10 million users (2)
 
Managing Your Application Lifecycle on AWS: Continuous Integration and Deploy...
Managing Your Application Lifecycle on AWS: Continuous Integration and Deploy...Managing Your Application Lifecycle on AWS: Continuous Integration and Deploy...
Managing Your Application Lifecycle on AWS: Continuous Integration and Deploy...
 
Best Practices for Security at Scale
Best Practices for Security at ScaleBest Practices for Security at Scale
Best Practices for Security at Scale
 
Day 3 - DevOps Culture - Continuous Integration & Continuous Deployment on th...
Day 3 - DevOps Culture - Continuous Integration & Continuous Deployment on th...Day 3 - DevOps Culture - Continuous Integration & Continuous Deployment on th...
Day 3 - DevOps Culture - Continuous Integration & Continuous Deployment on th...
 
Migration of Microsoft Workloads
Migration of Microsoft WorkloadsMigration of Microsoft Workloads
Migration of Microsoft Workloads
 
Build a Website on AWS for Your First 10 Million Users
Build a Website on AWS for Your First 10 Million UsersBuild a Website on AWS for Your First 10 Million Users
Build a Website on AWS for Your First 10 Million Users
 
Increase Speed and Agility with Amazon Web Services
Increase Speed and Agility with Amazon Web ServicesIncrease Speed and Agility with Amazon Web Services
Increase Speed and Agility with Amazon Web Services
 
Increase Speed and Agility with Amazon Web Services
Increase Speed and Agility with Amazon Web ServicesIncrease Speed and Agility with Amazon Web Services
Increase Speed and Agility with Amazon Web Services
 
Security Best Practices_John Hildebrandt
Security Best Practices_John HildebrandtSecurity Best Practices_John Hildebrandt
Security Best Practices_John Hildebrandt
 
Build an App on AWS for Your First 10 Million Users
Build an App on AWS for Your First 10 Million UsersBuild an App on AWS for Your First 10 Million Users
Build an App on AWS for Your First 10 Million Users
 
AWS re:Invent 2016: Infrastructure Continuous Delivery Using AWS CloudFormati...
AWS re:Invent 2016: Infrastructure Continuous Delivery Using AWS CloudFormati...AWS re:Invent 2016: Infrastructure Continuous Delivery Using AWS CloudFormati...
AWS re:Invent 2016: Infrastructure Continuous Delivery Using AWS CloudFormati...
 
Microsoft SQL Server Dive Deep.pdf
Microsoft SQL Server Dive Deep.pdfMicrosoft SQL Server Dive Deep.pdf
Microsoft SQL Server Dive Deep.pdf
 
Deep Dive on Microservices and Amazon ECS
Deep Dive on Microservices and Amazon ECSDeep Dive on Microservices and Amazon ECS
Deep Dive on Microservices and Amazon ECS
 
Agile Deployment using Git and AWS Elastic Beanstalk
Agile Deployment using Git and AWS Elastic BeanstalkAgile Deployment using Git and AWS Elastic Beanstalk
Agile Deployment using Git and AWS Elastic Beanstalk
 

Plus de Amazon Web Services

Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...Amazon Web Services
 
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...Amazon Web Services
 
Esegui pod serverless con Amazon EKS e AWS Fargate
Esegui pod serverless con Amazon EKS e AWS FargateEsegui pod serverless con Amazon EKS e AWS Fargate
Esegui pod serverless con Amazon EKS e AWS FargateAmazon Web Services
 
Costruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWSCostruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWSAmazon Web Services
 
Come spendere fino al 90% in meno con i container e le istanze spot
Come spendere fino al 90% in meno con i container e le istanze spot Come spendere fino al 90% in meno con i container e le istanze spot
Come spendere fino al 90% in meno con i container e le istanze spot Amazon Web Services
 
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...Amazon Web Services
 
OpsWorks Configuration Management: automatizza la gestione e i deployment del...
OpsWorks Configuration Management: automatizza la gestione e i deployment del...OpsWorks Configuration Management: automatizza la gestione e i deployment del...
OpsWorks Configuration Management: automatizza la gestione e i deployment del...Amazon Web Services
 
Microsoft Active Directory su AWS per supportare i tuoi Windows Workloads
Microsoft Active Directory su AWS per supportare i tuoi Windows WorkloadsMicrosoft Active Directory su AWS per supportare i tuoi Windows Workloads
Microsoft Active Directory su AWS per supportare i tuoi Windows WorkloadsAmazon Web Services
 
Database Oracle e VMware Cloud on AWS i miti da sfatare
Database Oracle e VMware Cloud on AWS i miti da sfatareDatabase Oracle e VMware Cloud on AWS i miti da sfatare
Database Oracle e VMware Cloud on AWS i miti da sfatareAmazon Web Services
 
Crea la tua prima serverless ledger-based app con QLDB e NodeJS
Crea la tua prima serverless ledger-based app con QLDB e NodeJSCrea la tua prima serverless ledger-based app con QLDB e NodeJS
Crea la tua prima serverless ledger-based app con QLDB e NodeJSAmazon Web Services
 
API moderne real-time per applicazioni mobili e web
API moderne real-time per applicazioni mobili e webAPI moderne real-time per applicazioni mobili e web
API moderne real-time per applicazioni mobili e webAmazon Web Services
 
Database Oracle e VMware Cloud™ on AWS: i miti da sfatare
Database Oracle e VMware Cloud™ on AWS: i miti da sfatareDatabase Oracle e VMware Cloud™ on AWS: i miti da sfatare
Database Oracle e VMware Cloud™ on AWS: i miti da sfatareAmazon Web Services
 
Tools for building your MVP on AWS
Tools for building your MVP on AWSTools for building your MVP on AWS
Tools for building your MVP on AWSAmazon Web Services
 
How to Build a Winning Pitch Deck
How to Build a Winning Pitch DeckHow to Build a Winning Pitch Deck
How to Build a Winning Pitch DeckAmazon Web Services
 
Building a web application without servers
Building a web application without serversBuilding a web application without servers
Building a web application without serversAmazon Web Services
 
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...Amazon Web Services
 
Introduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container ServiceIntroduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container ServiceAmazon Web Services
 

Plus de Amazon Web Services (20)

Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
 
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
 
Esegui pod serverless con Amazon EKS e AWS Fargate
Esegui pod serverless con Amazon EKS e AWS FargateEsegui pod serverless con Amazon EKS e AWS Fargate
Esegui pod serverless con Amazon EKS e AWS Fargate
 
Costruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWSCostruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWS
 
Come spendere fino al 90% in meno con i container e le istanze spot
Come spendere fino al 90% in meno con i container e le istanze spot Come spendere fino al 90% in meno con i container e le istanze spot
Come spendere fino al 90% in meno con i container e le istanze spot
 
Open banking as a service
Open banking as a serviceOpen banking as a service
Open banking as a service
 
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
 
OpsWorks Configuration Management: automatizza la gestione e i deployment del...
OpsWorks Configuration Management: automatizza la gestione e i deployment del...OpsWorks Configuration Management: automatizza la gestione e i deployment del...
OpsWorks Configuration Management: automatizza la gestione e i deployment del...
 
Microsoft Active Directory su AWS per supportare i tuoi Windows Workloads
Microsoft Active Directory su AWS per supportare i tuoi Windows WorkloadsMicrosoft Active Directory su AWS per supportare i tuoi Windows Workloads
Microsoft Active Directory su AWS per supportare i tuoi Windows Workloads
 
Computer Vision con AWS
Computer Vision con AWSComputer Vision con AWS
Computer Vision con AWS
 
Database Oracle e VMware Cloud on AWS i miti da sfatare
Database Oracle e VMware Cloud on AWS i miti da sfatareDatabase Oracle e VMware Cloud on AWS i miti da sfatare
Database Oracle e VMware Cloud on AWS i miti da sfatare
 
Crea la tua prima serverless ledger-based app con QLDB e NodeJS
Crea la tua prima serverless ledger-based app con QLDB e NodeJSCrea la tua prima serverless ledger-based app con QLDB e NodeJS
Crea la tua prima serverless ledger-based app con QLDB e NodeJS
 
API moderne real-time per applicazioni mobili e web
API moderne real-time per applicazioni mobili e webAPI moderne real-time per applicazioni mobili e web
API moderne real-time per applicazioni mobili e web
 
Database Oracle e VMware Cloud™ on AWS: i miti da sfatare
Database Oracle e VMware Cloud™ on AWS: i miti da sfatareDatabase Oracle e VMware Cloud™ on AWS: i miti da sfatare
Database Oracle e VMware Cloud™ on AWS: i miti da sfatare
 
Tools for building your MVP on AWS
Tools for building your MVP on AWSTools for building your MVP on AWS
Tools for building your MVP on AWS
 
How to Build a Winning Pitch Deck
How to Build a Winning Pitch DeckHow to Build a Winning Pitch Deck
How to Build a Winning Pitch Deck
 
Building a web application without servers
Building a web application without serversBuilding a web application without servers
Building a web application without servers
 
Fundraising Essentials
Fundraising EssentialsFundraising Essentials
Fundraising Essentials
 
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
 
Introduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container ServiceIntroduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container Service
 

Dernier

"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...Zilliz
 
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 challengesrafiqahmad00786416
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdfSandro Moreira
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Zilliz
 
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 Takeoffsammart93
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
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 2024Victor Rentea
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
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.pdfOrbitshub
 
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 ModelDeepika Singh
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native ApplicationsWSO2
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontologyjohnbeverley2021
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxRemote DBA Services
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxRustici Software
 
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...Jeffrey Haguewood
 
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 AmsterdamUiPathCommunity
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 

Dernier (20)

"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
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
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
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 value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
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
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
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
 
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
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
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...
 
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
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 

(DVO312) Sony: Building At-Scale Services with AWS Elastic Beanstalk

  • 1. © 2015, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Sumio Okada, Engineer, Sony Shinya Kawaguchi, Engineer, Sony October 2015 DVO 312 Building At-Scale Services with AWS Elastic Beanstalk Build a Cloud-native Authentication and Profile Management Platform on AWS
  • 2. What to expect from the session You will learn how to use AWS Elastic Beanstalk: • As a platform to easily build customized web application at scale on AWS. • To seamlessly build cloud-native applications with other AWS services.
  • 3. Agenda • Introduction • Architecture • Implementation • Conclusion
  • 5. Who are we? We provide cloud solutions for Sony products and applications. TV Side View Smart Tennis Sensor Smart B-Trainer Play Memories Online
  • 7. Previous platform • Built on the top of IaaS • Self managed ‘base services’ • Monolithic system
  • 8. Motivation of rebuild • Agility • Robustness • Efficiency
  • 9. Achievement - agility BeforeItem Deployment time Half a day 40 Min. Zero downtime release Release trouble rate 30% 0% After Release interval Bi-weekly NA (on demand)
  • 10. Achievement - robustness Before AfterItem Access surges impact Unstable or down No impact IaaS trouble impact Service damage No impact Emergency operation Auto recover/healing Related service down Affecting an entire system Minimum impact
  • 11. Achievement - efficiency Before AfterItem Config management Manual Git (Infrastructure as Code) 7+ self-managed services 0Infra for management Scaling Not flexible Auto Scaling
  • 13. Auth & Profile Mutually independent microservices Service Providers Frontend Backend Third party Authentication Services
  • 14. Service Providers Third party Authentication Services Backend Authentication and profile management system Frontend Auth & Profile
  • 15. System overview Authentication and profile management system - 1 Public PublicPrivatePublic PrivatePublic AZ-2 us-west2 AZ-1 NAT NAT HA Service Providers NATAPI NATAPI S3 Data Pipeline Batch EC2 Resource Batch Config Log Backup Profile DB DynamoDB API Call DynamoDB/S3 Route53 Third party Authentication Services
  • 16. System overview Authentication and profile management system - 2 Public PublicPrivatePublic PrivatePublic AZ-2 us-west2 Route53 AZ-1 S3 Service Providers API Call DynamoDB/S3 Data Pipeline Batch EC2 Resource NAT NATAPI NATAPI NAT Batch Config Log Backup Profile DB DynamoDB HA Third party Authentication Services
  • 17. us-west2 System overview – CloudFormation Base layer Public PublicPrivatePublic PrivatePublic AZ-2 AZ-1 S3 NAT NAT Profile DB Dynamo DB CloudFormation HA
  • 18. Public PublicPrivatePublic PrivatePublic AZ-2 us-west2 AZ-1 S3 NAT NAT Profile DB Dynamo DB HA System overview - Elastic Beanstalk Application layer Elastic Beanstalk NATAPI NATAPI
  • 19. Continuous delivery system Code Repository Development Push Code 3 Build Kick off 4 Unit Test 5 Push Image 6 Provision & Deploy 7 Sanity Test Result Delivery system without self-managed infrastructure 1 2 3 4 6 7 8 Development QA5 Integration Test5 Get Image Production
  • 20. Throttling and Circuit Breaker Self-defense for robustness Throttling Circuit Breaker APIs Throttling Circuit Breaker Third party Authentication Services
  • 21. Zero-management infrastructure EC2 Cloud Watch, Logs SNS S3 Lambda Redshift Targets Monitoring Metrics Notification / Communication Log Analysis Logs Import Logs, Metrics
  • 25. Infrastructure as code • Automated operations • Version control • Continuous delivery
  • 26. Infrastructure as code • Versioning: • CloudFormation templates • Elastic Beanstalk configuration files (.ebextensions/*.config) • Application/environment configuration files • Automation scripts
  • 28. Auto Scaling based on custom metric • Custom Metric via Data Pipeline AppApp Alarms ELB Metrics ELB Metrics CloudWatch Data Pipeline Auto Scaling group Custom Metric (Successful Response Rate per Instance)
  • 29. Auto Scaling based on custom metric • Custom scaling policies via .ebextensions Resources: AutoScalingScaleOutPolicy: Type: AWS::AutoScaling::ScalingPolicy Properties: AdjustmentType: ChangeInCapacity AutoScalingGroupName: { "Ref" : "AWSEBAutoScalingGroup" } ScalingAdjustment: 2 AutoScalingScaleOutAlarm: Type: AWS::CloudWatch::Alarm Properties: Namespace: { "Fn::GetOptionSetting" : { "OptionName" : "AutoScalingMetricNamespace" } } MetricName: { "Fn::GetOptionSetting" : { "OptionName" : "AutoScalingMetricName" } } Dimensions: [ { "Name" : "LoadBalancerName", "Value" : { "Ref" : "AWSEBLoadBalancer" } } ] ... AlarmActions: [ { "Ref" : "AutoScalingScaleOutPolicy" } ]
  • 30. Auto Scaling based on custom metric Disable default scaling policies via .ebextensions Resources: AWSEBCloudwatchAlarmHigh: Type: AWS::CloudWatch::Alarm Properties: AlarmActions: [ { "Ref" : "AWS::NoValue" } ] AWSEBCloudwatchAlarmLow: Type: AWS::CloudWatch::Alarm Properties: AlarmActions: [ { "Ref" : "AWS::NoValue" } ]
  • 32. High availability for application • Zero downtime deployment • Auto healing based on deep health check • Disk space shortage prevention
  • 33. Zero downtime deployment Auto Scaling group • Rolling deployments • Update application instances one by one Batch Batch Batch App Working App Working App Working
  • 34. Zero downtime deployment Auto Scaling group • Rolling deployments • Update application instances one by one Batch Batch Batch App Working App Working App Updating
  • 35. Zero downtime deployment • Rolling deployments via .ebextensions option_settings: "aws:elasticbeanstalk:command": BatchSizeType: Fixed BatchSize: 1
  • 36. Zero downtime deployment Conflict between rolling deployments and scaling out • Taken care of by Elastic Beanstalk
  • 37. Zero downtime deployment • Rolling updates • Dynamic batch size Auto Scaling group MinSize 2 MaxSize 10 Batch Batch App Working App Working App Working App Working Increased by scaling out
  • 38. Zero downtime deployment • Rolling updates • Keep the number of in-service instances Auto Scaling group MinSize 2 MaxSize 10 Batch Batch App Working App Working App Working App Working New Launching New Launching
  • 39. Zero downtime deployment • Rolling updates • Keep the number of in-service instances Auto Scaling group MinSize 2 MaxSize 10 BatchApp Working App Working New Launching New Launching BatchNew Working New Working App Terminating App Terminating
  • 40. Zero downtime deployment • Rolling updates via .ebextensions option_settings: "aws:autoscaling:updatepolicy:rollingupdate": RollingUpdateEnabled: true MaxBatchSize: <num of running instances> / 2 # eg.) 2 MinInstancesInService: <num of running instances> # eg.) 4
  • 41. Zero downtime deployment Tradeoff • Rolling deployments/updates Definite app version switching Low tolerance to deployment failure (rolling deployments)
  • 42. Zero downtime deployment Tradeoff • Rolling deployments/updates Definite app version switching Low tolerance to deployment failure (rolling deployments) • CNAME swap High tolerance to deployment failure DNS propagation
  • 43. Zero downtime deployment Tradeoff • Rolling deployments/updates Definite app version switching Low tolerance to deployment failure (rolling deployments) • CNAME swap High tolerance to deployment failure DNS propagation
  • 44. Auto healing based on deep health check • Deep health check • Accuracy of system time • Accessibility to main database (DynamoDB)
  • 45. Auto healing based on deep health check • Deep health check configuration via .ebextensions option_settings: "aws:elasticbeanstalk:application": "Application Healthcheck URL": /1/status "aws:elb:healthcheck": Interval: 15 Timeout: 10 HealthyThreshold: 3 UnhealthyThreshold: 3
  • 46. Auto healing based on deep health check • Auto healing configuration via .ebextensions Resources: AWSEBAutoScalingGroup: Type: AWS::AutoScaling::AutoScalingGroup Properties: HealthCheckType: ELB
  • 47. Auto healing based on deep health check Rolling deployments with auto healing configuration Problem • Unexpected instance termination caused by Elastic Beanstalk
  • 48. Auto healing based on deep health check Rolling deployments with auto healing configuration Problem • Unexpected instance termination caused by Elastic Beanstalk Workaround • Suspend HealthCheck process in AWSEBAutoScalingGroup during rolling deployments
  • 49. Disk space shortage prevention • Docker image local cache size 0% 20% 40% 60% 80% 100% 1 2 … n Free Docker Image Local Cache System Rolling Deployments DiskUsage Pulling new layers
  • 50. Disk space shortage prevention • Remove unused Docker images via .ebextensions files: "/opt/elasticbeanstalk/hooks/appdeploy/post/99_01_remove-unused-docker-images.sh": mode: "000755" owner: root group: root content: | #!/bin/bash docker images | grep -v "aws_beanstalk/" | grep -v "REPOSITORY" | xargs -I {} /bin/bash -c ' repository=$(echo "{}" | awk "{ print $1 }") tag=$(echo "{}" | awk "{ print $2 }") image_id=$(echo "{}" | awk "{ print $3 }") docker rmi $image_id || docker tag $image_id $repository:$tag || true ' || true
  • 51. Disk space shortage prevention • Docker container log size • Container logs captured by Elastic Beanstalk • /var/log/eb-docker/containers/eb-current-app/*-stdouterr.log • Original container logs • /var/lib/docker/containers/<cid>/<cid>-json.log
  • 52. Disk space shortage prevention • Docker container log size • Container logs captured by Elastic Beanstalk Rotated • Original container logs Keeps growing in size
  • 53. Disk space shortage prevention • Docker container logs truncation via .ebextensions files: "/etc/cron.hourly/cron.logtruncate.docker.json.log.conf": mode: "000755" owner: root group: root content: | #!/bin/sh # truncate docker container logs here. # see appendix for the actual script implementation. ...
  • 54. High availability for NAT • NAT instance in AutoScalingGroup • Periodic route table monitoring
  • 55. NAT instance in AutoScalingGroup • Static resources created via CloudFormation Public Subnet Public Subnet Private Subnet for Apps Private Subnet for Apps AZ-2 AWS Region AZ-1 tag:NetworkSegment NAT-A tag:NetworkSegment NAT-B Internet MinSize 1 MaxSize 1 MinSize 1 MaxSize 1
  • 56. NAT instance in AutoScalingGroup • Dynamic NAT instances Public Subnet Public Subnet Private Subnet for Apps Private Subnet for Apps AZ-2 AWS Region AZ-1 NAT Pending NAT Pending tag:NetworkSegment NAT-A Public IP Internet tag:NetworkSegment NAT-B Public IP tag:NetworkSegment NAT-A tag:NetworkSegment NAT-B AutoScalingGroup launches new NAT instance.
  • 57. NAT instance in AutoScalingGroup • Dynamic NAT instance configuration via cloud-init Public Subnet Public Subnet Private Subnet for Apps Private Subnet for Apps AZ-2 AWS Region AZ-1 NAT Running NAT Running tag:NetworkSegment NAT-A Elastic IP Internet tag:NetworkSegment NAT-B Elastic IP tag:NetworkSegment NAT-A tag:NetworkSegment NAT-B Disable SRC/DST check, Assign Elastic IP, etc...
  • 58. NAT instance in AutoScalingGroup • Route table lookup Public Subnet Public Subnet Private Subnet for Apps Private Subnet for Apps AZ-2 AWS Region AZ-1 NAT Running NAT Running Internet New NAT Instance looks up route tables based on tag. tag:NetworkSegment NAT-A tag:NetworkSegment NAT-B tag:NetworkSegment NAT-A Elastic IP tag:NetworkSegment NAT-B Elastic IP
  • 59. NAT Instance in AutoScalingGroup • Dynamic route configuration Public Subnet Public Subnet Private Subnet for Apps Private Subnet for Apps AZ-2 AWS Region AZ-1 NAT Running NAT Running tag:NetworkSegment NAT-A tag:RoutingStatus OK tag:NetworkSegment NAT-B tag:RoutingStatus OK Internet tag:NetworkSegment NAT-A Elastic IP tag:NetworkSegment NAT-B Elastic IP
  • 60. Periodic route table monitoring • Running normally Public Subnet Public SubnetPrivate Subnet Private Subnet AZ-2 AWS Region AZ-1 NAT Running NATApp NATApp NAT Running tag:NetworkSegment NAT-A tag:RoutingStatus OK tag:NetworkSegment NAT-B tag:RoutingStatus OK 0.0.0.0/0 Active tag:NetworkSegment NAT-A Internet 0.0.0.0/0 Active tag:NetworkSegment NAT-B NAT Instances monitor route tables located in different AZs periodically.
  • 61. Periodic route table monitoring • Black hole route detection Public Subnet Public SubnetPrivate Subnet Private Subnet AZ-2 AWS Region AZ-1 NAT Terminated NATApp NATApp NAT Running tag:NetworkSegment NAT-A tag:RoutingStatus OK tag:NetworkSegment NAT-B tag:RoutingStatus OK 0.0.0.0/0 Black Hole tag:NetworkSegment NAT-A Internet 0.0.0.0/0 Active tag:NetworkSegment NAT-B Healthy NAT Instance detects blackhole internet route.
  • 62. AWS Region Periodic route table monitoring • Outbound traffic takeover Public Subnet Public SubnetPrivate Subnet Private Subnet AZ-2 AZ-1 NAT Terminated NATApp NATApp NAT Running tag:NetworkSegment NAT-A tag:RoutingStatus TakenOver tag:NetworkSegment NAT-B tag:RoutingStatus OK Internet 0.0.0.0/0 Active Healthy NAT Instance takes over outboud traffic to internet. tag:NetworkSegment NAT-A tag:NetworkSegment NAT-B
  • 63. AWS Region Periodic route table monitoring • Outbound traffic takeover Public Subnet Public SubnetPrivate Subnet Private Subnet AZ-2 AZ-1 NAT Terminated NATApp NATApp NAT Running tag:NetworkSegment NAT-A tag:RoutingStatus TakenOver tag:NetworkSegment NAT-B tag:RoutingStatus OK Internet 0.0.0.0/0 Active NAT Pending tag:NetworkSegment NAT-A AutoScalingGroup launches new NAT instance. tag:NetworkSegment NAT-B
  • 64. AWS Region Periodic route table monitoring • Route table lookup Public Subnet Public SubnetPrivate Subnet Private Subnet AZ-2 AZ-1 NAT Terminated NATApp NATApp NAT Running tag:NetworkSegment NAT-A tag:RoutingStatus TakenOver tag:NetworkSegment NAT-B tag:RoutingStatus OK Internet 0.0.0.0/0 Active NAT Running tag:NetworkSegment NAT-A tag:NetworkSegment NAT-B New NAT Instance looks up route tables based on tag.
  • 65. AWS Region Periodic route table monitoring • Outbound traffic recovery Public Subnet Public SubnetPrivate Subnet Private Subnet AZ-2 AZ-1 NAT Terminated NATApp NATApp NAT Running tag:NetworkSegment NAT-A tag:RoutingStatus OK tag:NetworkSegment NAT-B tag:RoutingStatus OK tag:NetworkSegment NAT-B Internet 0.0.0.0/0 Active NAT Running tag:NetworkSegment NAT-A New NAT Instance recovers internet route. 0.0.0.0/0 Active
  • 66. Periodic route table monitoring Network capacity planning for NAT instances • Need to consider total amount of outbound traffic coming from application instances across Availability Zones
  • 68. Source IP address whitelisting • Without whitelisting AWSEBLoadBalancerSecurityGroup No Inbound Rules App App App x.x.x.1 x.x.x.6x.x.x.5 Applied by Elastic Beanstalk AWSEBLoadBalancer
  • 69. Source IP address whitelisting • With whitelisting ip-whitelist-group1-1 HTTPS TCP 443 x.x.x.1/32 … AWSEBLoadBalancerSecurityGroup No Inbound Rules ip-whitelist-group1-2 HTTPS TCP 443 x.x.x.2/32 ip-whitelist-group1-3 HTTPS TCP 443 x.x.x.3/32 ip-whitelist-group1-4 HTTPS TCP 443 x.x.x.4/32 Configuration files tag:IPWhitelistGroup DefaultGroup tag:IPWhitelistGroup Group1 tag:IPWhitelistGroup Group1 App App App x.x.x.1 x.x.x.6 Rules Rules Rules Rules x.x.x.5 Applied via script SecurityGroups Max 200 (4*50) rules are available AWSEBLoadBalancer Add rules via script
  • 70. Source IP address whitelisting • Tagging built-in resources via .ebextensions Resources: AWSEBLoadBalancer: Type: AWS::ElasticLoadBalancing::LoadBalancer Properties: Tags: - { Key: IPWhitelistGroup, Value: Group1 } AWSEBLoadBalancerSecurityGroup: Type: AWS::EC2::SecurityGroup Properties: GroupDescription: "Load Balancer Security Group" VpcId: { "Fn::GetOptionSetting" : { "OptionName" : "VPCId" } } Tags: - { Key: IPWhitelistGroup, Value: DefaultGroup }
  • 71. Source IP address whitelisting Fill required properties in security group for ELB via .ebextensionsResources: AWSEBLoadBalancer: Type: AWS::ElasticLoadBalancing::LoadBalancer Properties: Tags: - { Key: IPWhitelistGroup, Value: Group1 } AWSEBLoadBalancerSecurityGroup: Type: AWS::EC2::SecurityGroup Properties: GroupDescription: "Load Balancer Security Group" VpcId: { "Fn::GetOptionSetting" : { "OptionName" : "VPCId" } } Tags: - { Key: IPWhitelistGroup, Value: DefaultGroup } Specifying GroupDescription and VpcId is also required in order to modify AWSEBLoadBalancerSecurityGroup resource via .ebextensions.
  • 72. Connection/request throttling • Throttling per client (source IP address) Amazon Linux Docker Container App APIs Internal Service External Services Over Limit Over Limit Third party Authentication Services
  • 73. Internal Service Connection/request throttling • Throttling per remote user (internal service) Amazon Linux Docker Container External ServicesOver Limit Over Limit Internal Service App APIs Third party Authentication Services
  • 74. Connection/request throttling • nginx configuration file installation via .ebextensions files: "/etc/nginx/throttling/limit-zone-def.conf": mode: "000644" owner: root group: root content: | # include in http context limit_conn_zone $http_x_forwarded_for zone=conn_perclient:10m; limit_conn_zone $hostname zone=conn_total:1m; limit_conn_status 429; limit_req_zone $remote_user zone=req_perservice:10m rate=150r/s; limit_req_zone $hostname zone=req_total:1m rate=200r/s; limit_req_status 429;
  • 75. Connection/request throttling • nginx configuration file installation via .ebextensions files: "/etc/nginx/throttling/limit-per.conf": mode: "000644" owner: root group: root content: | # include in location context limit_conn conn_perclient 75; limit_req zone=req_perservice burst=300 nodelay;
  • 76. Connection/request throttling • nginx configuration file installation via .ebextensions files: "/etc/nginx/throttling/limit-total.conf": mode: "000644" owner: root group: root content: | # include in location context limit_conn conn_total 300; limit_req zone=req_total burst=400 nodelay;
  • 77. Connection/request throttling • nginx configuration script (.ebextensions/nginx-conf.sh) #!/bin/bash EB_CONFIG_HTTP_PORT=$(/opt/elasticbeanstalk/bin/get-config container -k instance_port) cat > /etc/nginx/sites-available/nginx-docker-proxy.conf <<EOF ... include throttling/limit-zone-def.conf; server { listen $EB_CONFIG_HTTP_PORT; location / { ... include throttling/limit-per.conf; include throttling/limit-total.conf; } location ~ /.+?/status { ... include throttling/limit-per.conf; } } EOF rm -f /etc/nginx/sites-enabled/* ln -sf /etc/nginx/sites-available/nginx-docker-proxy.conf /etc/nginx/sites-enabled/
  • 78. Connection/request throttling • nginx configuration via .ebextensions container_commands: nginx-conf-for-throttling: command: 'bash .ebextensions/nginx-conf.sh'
  • 79. Connection/request throttling Tradeoff Advantages taken from throttling Low compatibility
  • 80. External Services Internal Services Circuit Breaker • Proxy object for each external service Amazon Linux Docker Container App Open Closed Closed Closed APIs Immediate failure Third party Authentication Services
  • 82. Comprehensive log monitoring Cloud Watch, Logs SNS S3 Lambda Redshift Targets Monitoring Metrics Notification / Communication Log Analysis Logs Import Logs, Metrics AppNAT
  • 83. Comprehensive log monitoring • LogGroup creation via .ebextensions Resources: CWLSyslogMessagesLogGroup: Type: "AWS::Logs::LogGroup" DependsOn: AWSEBBeanstalkMetadata Properties: LogGroupName: { "Fn::Join" : [ "-", [ { "Ref" : "AWSEBEnvironmentName" }, "syslog-messages" ] ] } RetentionInDays: 14
  • 84. Comprehensive log monitoring • CloudWatch Logs agent config file via .ebextensions Resources: AWSEBAutoScalingGroup: Metadata: "AWS::CloudFormation::Init": CWLogsAgentConfigSetup: files: "/tmp/cwlogs/conf.d/core-logs.conf": content : | [/var/log/messages] file = /var/log/messages log_group_name = `{ "Ref" : "CWLSyslogMessagesLogGroup" }` log_stream_name = {instance_id} datetime_format = %b %d %H:%M:%S
  • 85. Notification / Communication Searchable log retention Cloud Watch, Logs SNS S3 Lambda Redshift Targets Monitoring Metrics Log Analysis Import Logs, Metrics AppNAT Logs
  • 86. Notification / Communication Searchable log retention Cloud Watch, Logs SNS S3 Lambda Redshift Targets Monitoring Metrics Log Analysis Import Logs, Metrics AppNAT flush_interval 60s flush_at_shutdown true Logs
  • 87. Searchable log retention • td-agent configuration via .ebextensions files: "/etc/sysconfig/td-agent": mode: "000644" owner: root group: root content: | # Run as root user TD_AGENT_ARGS="/usr/sbin/td-agent --group td-agent --log /var/log/td-agent/td-agent.log --use-v1-config --suppress-repeated-stacktrace" DAEMON_ARGS="--user root“ commands: 01-prepare-installer: command: ... # Install td-agent installation script to /tmp/td-agent/install-td-agent-v2.sh 02-run-installer-td-agent: command: bash /tmp/td-agent/install-td-agent-v2.sh 03-setup-configration: command: ... # Configure log sources for td-agent 04-restart-td-agent: command: service td-agent restart
  • 88. Searchable log retention • Enable ELB to upload access logs to Amazon S3 Resources: AWSEBLoadBalancer: Type: AWS::ElasticLoadBalancing::LoadBalancer Properties: AccessLoggingPolicy: S3BucketName: { "Fn::GetOptionSetting" : { "OptionName" : "LogsBucketName" } } S3BucketPrefix: "elb" Enabled: true EmitInterval: 5 # minutes
  • 90. Challenges and expectations • Compatibility • Ease of operation test
  • 91. Trouble-less eight months in production with Elastic Beanstalk • Flexibility Satisfy customization needs • Reliability No major problems • Simplicity Simplified DevOps
  • 96. Sony open source software • gobreaker • Go implementation of circuit breaker • Available on GitHub • https://github.com/sony/gobreaker • Feel free to submit pull requests and raise issues on the GitHub project
  • 97. Sony open source software • Sonyflake • Go implementation of distributed unique ID generator • Available on GitHub • https://github.com/sony/sonyflake • Small utility for AWS (VPC) included • Example running on EB provided • Feel free to submit pull requests and raise issues on the GitHub project
  • 98. Articles • Continuous Delivery with Golang and Docker • https://circleci.com/stories/sony
  • 99. References • Advanced network automation • (ARC401) Black-Belt Networking for the Cloud Ninja | AWS re:Invent 2014 • Docker container log rotation • https://github.com/docker/docker/issues/7333 • https://docs.docker.com/reference/logging/overview/
  • 100. Auto Scaling design Scale out timing chart Execute Policy Running In ServiceOut of Service App Startup ELB Determination Health Check Grace Period Deployment In Service Dead Line Resume Auto Scaling EC2 State ELB Instance State Cooldown Period (scale out policy) Register Instance Pending Auto Scaling Timers * in the case of HealthCheckType: ELB
  • 101. Auto Scaling design Scale out timing parameters Execute Policy Running In ServiceOut of Service App Startup 45 ELB Determination HealthCheck Interval x HealthyThreshold Health Check Grace Period 600 Deployment In Service Dead Line Resume Auto Scaling Margin 300 Margin for Balancing & Metric EC2 State ELB Instance State Cooldown Period (scale out policy) 900 300 avg. 15 3 300 Register Instance Pending Auto Scaling Timers * in the case of HealthCheckType: ELB
  • 102. Examples • Elastic IP association via cloud-init #!/bin/bash REGION=$1 EIP_ALLOCATION_ID=$2 INSTANCE_ID=$(curl --silent http://169.254.169.254/latest/meta-data/instance-id) while true; do INSTANCE_STATUS=$(aws --region "${REGION}" --output text ec2 describe-instance-status --instance-ids "${INSTANCE_ID}" --filters Name=instance-state-name,Values=running) if [[ $? = 0 && "${INSTANCE_STATUS}" != "" ]]; then aws --region "${REGION}" --output text ec2 associate-address --instance-id "${INSTANCE_ID}" --allocation-id "${EIP_ALLOCATION_ID}" && break fi sleep 5s done
  • 103. Examples • Elastic IP association via cloud-init • associate-address command fails if the instance is still in pending state • Need to wait for the instance to become running state before executing associate-address command
  • 104. Examples • Connection draining Keep accepting requests (10~20s) ConnectionDrainingTimeout
  • 105. Examples • Connection draining via .ebextensions option_settings: "aws:elb:policies": ConnectionDrainingEnabled: true ConnectionDrainingTimeout: 80 # 20 + 60 seconds
  • 106. Examples • Docker container log truncation #!/bin/sh cidfile=$(/opt/elasticbeanstalk/bin/get-config container -k app_deploy_file) [ ! -r "${cidfile}" ] && exit 0 cid=$(cat "${cidfile}") scid=${cid::12} dockerlog="/var/lib/docker/containers/${cid}/${cid}-json.log" [ ! -w "${dockerlog}" ] && exit 0 # The eb-log file made by Elastic Beanstalk. eblog="/var/log/eb-docker/containers/eb-current-app/${scid}-stdouterr.log" # PID of docker logs command related to the Container-ID. logspids=$(ps aux | grep "docker logs -f ${scid}" | grep -v grep | awk '{print $2}') for logspid in ${logspids} do # Count FD of docker logs related to the eb-log file. eblogfd=$(lsof -p ${logspid} | grep "${eblog}" | wc -l) # Expect to be redirected stdout and stderr to the eb-log file. [ ! ${eblogfd} -eq 2 ] && continue # Now, can truncate the docker-log file. cat /dev/null > ${dockerlog} break done
  • 107. Examples • Run ntpd in slew mode via .ebextensions files: "/etc/sysconfig/ntpd": mode: "000644" owner: root group: root content: | OPTIONS="-g -x" commands: "ntpd-service-restart": command: service ntpd restart
  • 108. Examples • Scaling event notification via .ebextensions Resources: AWSEBAutoScalingGroup: Type: AWS::AutoScaling::AutoScalingGroup Properties: HealthCheckType: ELB NotificationConfiguration: TopicARN: { "Fn::GetOptionSetting" : { "OptionName" : “ASGTopicArn" } } NotificationTypes: - autoscaling:EC2_INSTANCE_LAUNCH - autoscaling:EC2_INSTANCE_LAUNCH_ERROR - autoscaling:EC2_INSTANCE_TERMINATE - autoscaling:EC2_INSTANCE_TERMINATE_ERROR
  • 109. Examples • td-agent installation script #!/usr/bin/env bash Enterprise Linux 7 (releasever is '7') # add GPG key rpm --import http://packages.treasuredata.com/GPG-KEY-td-agent # add treasure data repository to yum cat > /etc/yum.repos.d/td.repo <<EOF [treasuredata] name=TreasureData baseurl=http://packages.treasuredata.com/2/redhat/7/$basearch gpgcheck=1 gpgkey=http://packages.treasuredata.com/GPG-KEY-td-agent EOF # install the toolbelt yum install -y td-agent-2.1.5-1 # install plugins /opt/td-agent/embedded/bin/fluent-gem install --no-document fluent-plugin-tail_path -v "=0.0.3" /opt/td-agent/embedded/bin/fluent-gem install --no-document fluent-plugin-forest -v "=0.3.0" /opt/td-agent/embedded/bin/fluent-gem install --no-document fluent-plugin-add -v "=0.0.3" # this plugin will be no longer required in next td-agent version. /opt/td-agent/embedded/bin/fluent-gem install --no-document fluent-plugin-s3 -v "=0.5.7" # enable service chkconfig td-agent on