The Cloud: What’s Different?

Fajri Abdillah
[email protected]

Every business required a system that can satisfied the customer

Happy customer == More money


Traditional (owned and operated) IT Infrastructure

unsplash-logoimgix

Business Point of View

1. Higher investment in Hardware

2. Too much server is costly

3. Too few server is making Our Customer unhappy

4. Higher Total Cost Of Ownership (TCO)

Technical Point of View

1. More time for capacity planning

2. Harder to keep up with Customer Data
(Harder to Scale)

3. More "Server" team

4. Slower in delivering software

Cloud

unsplash-logoPero Kalimero

Business Point of View

1. No investment in Hardware
(Pay as you go, pay per use)

2. Too much server is less costly
(Add more server when needed)

3. No more too few server
(Autoscaling to the rescue)

4. Lower Total Cost Of Ownership (TCO Calculator)

Technical Point of View

1. Less time for capacity planning

2. Easier to keep up with Customer Data
(Easier to scale)

3. Less "Server" team

4. Faster in delivering software

Airbnb in 4 years (2010 - 2013)

2 Billion rows stored in RDS

From 24 EC2 instances to 1000 EC2 instances

From 300GB of Photos to 50TB of Photos in S3

5 person operations team

https://infrastructure.aws

Serverless Architectures for Web Applications

unsplash-logoKaushik Panchal

What is serverless? [1][2][3]

Native architecture of the cloud that enables you to focus on business not infrastructure

Build and run applications and services without thinking about servers

No need to thinking about : server provisioning, patching, maintenance and capacity provisioning

Why use serverless?

Build modern applications with increased agility and lower TCO

Built-in high availability and fault tolerance, security is included

Developers can focus on code not infrastructure, more vacation time

Who use serverless?

Better Australian Census Website (Original)

Cost $9,000,000 with $400,000 on load testing alone

Load tested at a 150% of expected usage levels

"It crashed pretty much straight away" - Austin Wilshire

Better Australian Census Website (Serverless)

Cost $500 and under 24 hours of total work

Built by 2 University student that totally new to AWS

Tested with goad.io to achieve up to 100k requests per second

"cool: QUT Students built an Australian Census system for $500 that does not #CensusFail"
Werner Vogels [1] [2]

Mobile Analytics as a Service

11 million messages in SQS

How big is 10 million messages?

100 KB * 10 = 1,000 KB = 1 MB

100 KB * 100 = 10,000 KB = 10 MB

100 KB * 1,000 = 100,000 KB = 100 MB

100 KB * 10,000 = 1,000,000 KB = 1,000 MB = 1 GB

100 KB * 100,000 = 10,000,000 KB = 10,000 MB = 10 GB

100 KB * 1,000,000 = 100,000,000 KB

= 100,000 MB = 100 GB

100 KB * 10,000,000 = 1,000,000,000 KB

= 1,000,000 MB = 1,000 GB

= 1 TB

Messages in Flight

Processing ~2000 Messages / second

100 KB * 2,000 = 200,000 KB = 200 MB / second

AWS SQS

Amazon Simple Queue Service (Amazon SQS) offers a secure, durable, and available hosted queue that lets you integrate and decouple distributed software systems and components.

Redis based Queue
SQS based Queue
SQS - Power Features

Serverless - No need to think about server, battle tested since 2006

Unlimited Throughput - Standard queues support a nearly unlimited number of transactions per second

Security - Control who can send messages to and receive messages from an Amazon SQS queue

Durability - Make use of dead letter queue, no data is missing, up to 14 days data retention.

Event Source - Lambda can process message in SQS

SQS - Limitations

Single Consumer - once a consumer processed a message then message is removed

Tricky pricing - Billed per transaction, chunked per 64 KB, but still cheap

Limited payload size - 256 KB, can use S3 for bigger payload, up to 2 GB, but more expensive

Delay queue - Maximum 15 minutes

Maximum batch message - 10 messages or 256 KB

SQS - Pricing
Price per 1 Million Requests after Free Tier (Monthly)
Standard Queue $0.40 ($0.00000040 per request)
FIFO Queue $0.50 ($0.00000050 per request)
SQS - Demo

Thank You