Top Banner
Embrace the Cloud Henrik Møller Rasmussen · Founder & CTO at famly.co
45
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Embrace the Cloud - Inspiring Conference 2015

Embrace the Cloud Henrik Møller Rasmussen · Founder & CTO at famly.co

Page 2: Embrace the Cloud - Inspiring Conference 2015

The digital daycare

Page 3: Embrace the Cloud - Inspiring Conference 2015

TICKET.COM

Buy

Peaks with heavy load Always available

Page 4: Embrace the Cloud - Inspiring Conference 2015

+

Page 5: Embrace the Cloud - Inspiring Conference 2015

+

Page 6: Embrace the Cloud - Inspiring Conference 2015

Hub

Page 7: Embrace the Cloud - Inspiring Conference 2015

DNS - Route 53

“Amazon Route 53 is a highly available and scalable cloud Domain Name System (DNS) web service.”

Integrates extremely well with other AWS servicesElastic Load Balancing

Simple Email Services

Health checks / failover

Page 8: Embrace the Cloud - Inspiring Conference 2015

Let’s start simple - Elastic Beanstalk

“Amazon Elastic Beanstalk is an easy-to-use service for deploying and scaling web applications and services.”

Page 9: Embrace the Cloud - Inspiring Conference 2015

Elastic Compute Cloud (EC2)

t2.micro: 1 core, 1GiB ram ~ $15 / monthr3.8xlarge: 32 core, 244GiB ram ~ $2.000 / month

Page 10: Embrace the Cloud - Inspiring Conference 2015

Regions and Availability Zones

* Old map - more regions today

Page 11: Embrace the Cloud - Inspiring Conference 2015

Zone A Zone B Zone C

Region EU-WEST-1

Page 12: Embrace the Cloud - Inspiring Conference 2015

Zone A Zone B Zone C

Region EU-WEST-1

DNS Route 53

ticket.com

54.12.13.14

54.12.13.14

Page 13: Embrace the Cloud - Inspiring Conference 2015

MySQL - Amazon RDS

“Amazon Relational Database Service (Amazon RDS) is a web service that makes it easy to set up, operate, and scale a relational database in the cloud.”

Automated backups

Encryption in transit and at rest

Automated maintenance (security upgrades etc.)

Page 14: Embrace the Cloud - Inspiring Conference 2015

Zone A Zone B Zone C

Region EU-WEST-1

DNS Route 53

ticket.com

54.12.13.14

54.12.13.14

Buy

Page 15: Embrace the Cloud - Inspiring Conference 2015

Elastic Load Balancing

“Elastic Load Balancing automatically distributes incoming application traffic across multiple Amazon EC2 instances in the cloud.”

High availability

Scalable

SSL termination (encryption / decryption)

Page 16: Embrace the Cloud - Inspiring Conference 2015

Zone A Zone B Zone C

Region EU-WEST-1

DNS Route 53

ticket.com

One of ELB’s IP'sBuy

Elastic Load Balancing

Page 17: Embrace the Cloud - Inspiring Conference 2015

Problems with multiple servers

TYPO3 Flow sessions are stored in local file cache

Logging goes to local filesystem

Uploaded resources are stored on local filesystem

Page 18: Embrace the Cloud - Inspiring Conference 2015

TYPO3 Flow sessions are stored in local file cache

Solution:Change TYPO3 Flow’s session backend to a

database or redis backend (e.g. ElastiCache)

Page 19: Embrace the Cloud - Inspiring Conference 2015

Logging goes to local filesystem

Solution: Ship log files to a central logging server

CloudWatch

Page 20: Embrace the Cloud - Inspiring Conference 2015

Uploaded resources are stored on local filesystem

Solution:Upload resources to a shared file service (e.g. Amazon S3)

Page 21: Embrace the Cloud - Inspiring Conference 2015

Amazon S3

“Amazon S3 provides developers and IT teams with secure, durable, highly-scalable object storage.”

Easy to use

Cheap

Highly-scalable

Durable

Page 22: Embrace the Cloud - Inspiring Conference 2015

Zone A Zone B Zone C

Region EU-WEST-1

DNS Route 53

ticket.com

One of ELB’s IP'sBuy

Elastic Load Balancing

S3

Page 23: Embrace the Cloud - Inspiring Conference 2015

AWS PHP SDK

Install with composer

aws/aws-sdk-php

Page 24: Embrace the Cloud - Inspiring Conference 2015
Page 25: Embrace the Cloud - Inspiring Conference 2015

Zone A Zone B Zone C

Region EU-WEST-1

DNS Route 53

ticket.com

One of ELB’s IP'sBuy

Elastic Load Balancing

S3

Page 26: Embrace the Cloud - Inspiring Conference 2015

Auto-Scaling

“Auto Scaling helps you maintain application availability and allows you to scale your Amazon EC2 capacity up or down automatically according to conditions you define"

Page 27: Embrace the Cloud - Inspiring Conference 2015

Zone A Zone B Zone C

Region EU-WEST-1

DNS Route 53

ticket.com

One of ELB’s IP'sBuy

Elastic Load Balancing

S3

Page 28: Embrace the Cloud - Inspiring Conference 2015

Zone A Zone B Zone C

Region EU-WEST-1

DNS Route 53

ticket.com

One of ELB’s IP'sBuy

Elastic Load Balancing

S3

Page 29: Embrace the Cloud - Inspiring Conference 2015

RDS Multi-AZ

“Amazon RDS Multi-AZ deployments provide enhanced availability and durability for Database (DB) Instances"

Page 30: Embrace the Cloud - Inspiring Conference 2015

Zone A Zone B Zone C

Region EU-WEST-1

DNS Route 53

ticket.com

One of ELB’s IP'sBuy

Elastic Load Balancing

S3

Page 31: Embrace the Cloud - Inspiring Conference 2015

Zone A Zone B Zone C

Region EU-WEST-1

DNS Route 53

ticket.com

One of ELB’s IP'sBuy

Elastic Load Balancing

S3

Page 32: Embrace the Cloud - Inspiring Conference 2015

Zone B Zone C

Region EU-WEST-1

DNS Route 53

ticket.com

One of ELB’s IP'sBuy

Elastic Load Balancing

S3

Page 33: Embrace the Cloud - Inspiring Conference 2015

RDS Read Replicas

“Amazon RDS Read Replicas provide enhanced performance and durability”

Reading (HTTP GET) uses a random read replica

Writing (HTTP POST) goes to master

Page 34: Embrace the Cloud - Inspiring Conference 2015

Zone A Zone B Zone C

Region EU-WEST-1

DNS Route 53

ticket.com

One of ELB’s IP'sBuy

Elastic Load Balancing

S3

Page 35: Embrace the Cloud - Inspiring Conference 2015

Amazon SQS

“Amazon Simple Queue Service (SQS) is a fast, reliable, scalable, fully managed message queuing service.

Things to use a queue for:Generate and send emails (newsletters etc.)

Generate and send reports

Handling events in an event-driven architecture

Page 36: Embrace the Cloud - Inspiring Conference 2015

Zone A Zone B Zone C

Region EU-WEST-1

DNS Route 53

ticket.com

One of ELB’s IP'sBuy

Elastic Load Balancing

S3

SQS

Page 37: Embrace the Cloud - Inspiring Conference 2015

Emails - SES

“Amazon Simple Email Service (Amazon SES) is a cost-effective outbound-only email-sending service built on the

reliable and scalable infrastructure.”

High deliverability

Automated DKIM signing

Anti-spam agreements

Higher delivery rates

Page 38: Embrace the Cloud - Inspiring Conference 2015
Page 39: Embrace the Cloud - Inspiring Conference 2015

Push iOS / Android - Amazon SNS

“Amazon Simple Notification Service is a fast, flexible, fully managed push messaging service.”

Page 40: Embrace the Cloud - Inspiring Conference 2015

Amazon Cloudwatch

“Amazon CloudWatch is a monitoring service to collect and track metrics and set alarms.”

Page 41: Embrace the Cloud - Inspiring Conference 2015

And much more..

CDN (CloudFront)

Managed Redis / Memcached (ElastiCache)

And more …

Page 42: Embrace the Cloud - Inspiring Conference 2015

Start cost

My experience so far:99% predictable, 1% unknown

2 x t2.micro (with SSD)…………… ~ $30 1 x Load Balancer ………………………… ~ $20 1 x MySQL with failover…………… ~ $30 1 x MySQL Read replica …………… ~ $15 S3, Route 53, SES, SNS etc…… ~ $ 5 ——

Total ………………………………………………………… ~ $100 / month

AWS Pricing is very complex and hard to predict.

Page 43: Embrace the Cloud - Inspiring Conference 2015

+

Some of the reasons why I love AWS:• Fairly easy to get started (with a very advanced setup) • File/push/email/queue/cache/… services are super useful and easy to use • The auto-healing / auto-scaling features gives me peace of mind • Feels confident that we can scale easily using horizontal scaling

Page 44: Embrace the Cloud - Inspiring Conference 2015

Hub

Page 45: Embrace the Cloud - Inspiring Conference 2015

The digital daycare

Henrik Møller Rasmussen · [email protected] · Twitter: @heinodk Founder & CTO at famly.co

Thanks for listening.