how to run your startup on amazon web services presentation
TRANSCRIPT
-
8/8/2019 How to Run Your Startup on Amazon Web Services Presentation
1/36
Running Your Startup on
Amazon Web Services
Alex IskoldFounder/CEO AdaptiveBlue
Feature Writer ReadWriteWeb
-
8/8/2019 How to Run Your Startup on Amazon Web Services Presentation
2/36
Amazon Web Services (AWS) -
robust, scalable and affordableinfrastructure for cloud computing.
This session is about:
-
8/8/2019 How to Run Your Startup on Amazon Web Services Presentation
3/36
We will cover: The Basics of Cloud Computing
The Benefits of Using Amazon Web Services Amazon Web Services Stack
How AdaptiveBlue is using AWS
How you can get started using AWS
-
8/8/2019 How to Run Your Startup on Amazon Web Services Presentation
4/36
Basics of Cloud Computing
-
8/8/2019 How to Run Your Startup on Amazon Web Services Presentation
5/36
Basics of Cloud Computing
QuickTi
c
r
ss
r
r
t
s
this ictur
.
QuickTi
c
r
ss
r
r
t
s
this ictur
.
QuickTi
c
r
ss
r
r
t
s
this ictur
.
QuickTi
c
r
ss
r
r
t
s
this ictur
.
QuickTi
c
r
ss
r
r
t
s
this ictur
.
QuickTi
c
r
ss
r
r
t
s
this ictur
.
Scalable Hardware Layer
-
8/8/2019 How to Run Your Startup on Amazon Web Services Presentation
6/36
Basics of Cloud Computing
QuickTi
c
r
ss
r
r
t
s
this
ictur
.
QuickTi
c
r
ss
r
r
t
s
this
ictur
.
QuickTi
c
r
ss
r
r
t
s
this
ictur
.
QuickTi
c
r
ss
r
r
t
s
this
ictur
.
QuickTi
c
r
ss
r
r
t
s
this
ictur
.
QuickTi
c
r
ss
r
r
t
s
this
ictur
.
Scalable Hardware Layer
Software Infrastructure Layer
GridService
StorageService
QueueService
-
8/8/2019 How to Run Your Startup on Amazon Web Services Presentation
7/36
Example: Storage Service
QuickTi
c
r
ss
r
r
t
s
this
ictur
.
QuickTi
c
r
ss
r
r
t
s
this
ictur
.
QuickTi
c
r
ss
r
r
t
s
this
ictur
.
QuickTi
c
r
ss
r
r
t
s
this
ictur
.
StorageService
Storage
Service
Storage
Service
Storage
ServiceNew Server
The data is automatically
re-partitioned/re-balanced to
take advantage of the new server
-
8/8/2019 How to Run Your Startup on Amazon Web Services Presentation
8/36
5 Benefits of Using
Amazon Web Services
-
8/8/2019 How to Run Your Startup on Amazon Web Services Presentation
9/36
1. Pay-per use model
You are only charged for disk space,
CPU time and bandwidth that you use.
-
8/8/2019 How to Run Your Startup on Amazon Web Services Presentation
10/36
2. Instant scalability
Your Service automatically
scales on AWS stack.
-
8/8/2019 How to Run Your Startup on Amazon Web Services Presentation
11/36
3. Reliable/Redundant/Secure
Infrequent outages (so far).
Data is redundant in the cloud.All services have built-in security.
* Soon will add Comprehensive to the list.
-
8/8/2019 How to Run Your Startup on Amazon Web Services Presentation
12/36
4. Most services accessed via simple
REST/SOAP API
Libraries are available in all major languages.
Minimal learning curve.
-
8/8/2019 How to Run Your Startup on Amazon Web Services Presentation
13/36
5. Amazon - Experience &
Commitment
Amazon has been doing this for ~15 years.
Company-wide commitment to AWS.
-
8/8/2019 How to Run Your Startup on Amazon Web Services Presentation
14/36
Amazon Web Services Stack
-
8/8/2019 How to Run Your Startup on Amazon Web Services Presentation
15/36
Simple DatabaseService (SimpleDB)
Elastic Cloud
Service (EC2)
Simple Storage
Service (S3)
Simple QueueService (SQS)
-
8/8/2019 How to Run Your Startup on Amazon Web Services Presentation
16/36
Elastic Compute Cloud (EC2)
On-demand grid
-
8/8/2019 How to Run Your Startup on Amazon Web Services Presentation
17/36
EC2
in a Nutshell
QuickTi !"
#
$
%
#
%
"
c&
! '
r"
ss&
r#
r"
$
" "
%
"
%
t&
s" "
this'
ictur"
.
QuickTi !"
#
$
%
#
%
"
c&
! '
r"
ss&
r#
r"
$
" "
%
"
%
t&
s" "
this'
ictur"
.
QuickTi !"
#
$
%
#
%
"
c&
! '
r"
ss&
r#
r"
$
" "
%
"
%
t&
s" "
this'
ictur"
.
Machine
Image
(OS + Apps)
Usage:
Create Machine Image
Deploy the image to S3 Start 1 or more instances
Use it as regular machine(s)
Main Options:
Dynamic/Static IPS
Choose cores
Choose locations
Persistence via EBS
-
8/8/2019 How to Run Your Startup on Amazon Web Services Presentation
18/36
SampleE
C2
Use CasesBatch Processing
All instances are configured with the same code.
Each instance operates on a subset of data.
Partitions are specified in configuration file.
Web Service
All instances are configured with the same code.
One or more instances are configured as load balancers(HAProxy for example).
DNS Server distributes requests between load balancers.
-
8/8/2019 How to Run Your Startup on Amazon Web Services Presentation
19/36
EC2
vs. Web Hosting CompanyGood
Instantly add new instances Full-control over the machines and choice of the environment
Likely cheaper (but depends on your exact situation)
Bad
Need to put the images together and manage instances
No dedicated technical support
(but there is premium support and RightScale solutions)
-
8/8/2019 How to Run Your Startup on Amazon Web Services Presentation
20/36
Simple Storage Service (S3)
Large media and everything else storage.
-
8/8/2019 How to Run Your Startup on Amazon Web Services Presentation
21/36
S3
in a Nutshell
Client
Idea:
Put/Get objects into buckets
based on unique keys.
Main Features:
Public/Private access.
Support for large objects.
Amazon S3
Bucket 1 Bucket N
Put object Get object
-
8/8/2019 How to Run Your Startup on Amazon Web Services Presentation
22/36
Sample S3
Use CasesImage/Video storage
Put your media once on S3 and then serve it up
Reads are 10 times cheaper than writes!
Serialize your Java Objects
Define unique key based on the object attributes
Write out binary serialized version to a stream
Write bytes to S3
Read them back when needed
-
8/8/2019 How to Run Your Startup on Amazon Web Services Presentation
23/36
Simple Database Service (SimpleDB)
Basic database and indexing service
-
8/8/2019 How to Run Your Startup on Amazon Web Services Presentation
24/36
Simple DB in a Nutshell
Client
Idea:
Create flat database with
auto-indexed tables.
Main Features:
Each attribute is indexed. Record structure is flexible.
Basic operators in queries
Supports sorting.
Simple DB Domain
Record 1
Put recordGet record
Query records
Key1 Attributes: A1,A2
Record N
Key2 Attributes: A1,A2
-
8/8/2019 How to Run Your Startup on Amazon Web Services Presentation
25/36
Sample SimpleDB Use CasesIndex Media files stored on S3
Use the same key as on S3
Write the record with each metadata element as attribute
Store flat objects
Use SimpleDB as a storage for non-nested data
-
8/8/2019 How to Run Your Startup on Amazon Web Services Presentation
26/36
Simple Queue Service (SQS)
Infinite Asynchronous Queue
-
8/8/2019 How to Run Your Startup on Amazon Web Services Presentation
27/36
SQS in a Nutshell
Writer
Idea:
Create an infinite
asynchronous queue.
Main Features:
Multiple queues
Upto 4K messages
Message Locking
SQS Queue
Message 1
Send
Message
Receive
Message
Message N
Reader
-
8/8/2019 How to Run Your Startup on Amazon Web Services Presentation
28/36
Sample SQS Use CasesTwitter Friend Update
For each update generate a task to update friends
Process updates in order
Publish/Subscribe
Post messages to the queue to inform multiple subscribers
Process Pipeline
Use different queues to put, for example, and order through a pipeline.
-
8/8/2019 How to Run Your Startup on Amazon Web Services Presentation
29/36
How AdaptiveBlue uses
Amazon Web Services
-
8/8/2019 How to Run Your Startup on Amazon Web Services Presentation
30/36
AdaptiveBlue OverviewWe develop browser enhancement technologies thatdeliver contextual relevant information into the user
current page:
Qui(
) 0
i1 2
3
4 5
6
4
6
2 ( 7 1 8 9 2 @ @ 7 9
4 9 2 5 2 2
6
2
6 A
7 @ 2 2
A
hi@ 8
i(
A
ure.
1. What did your friends and other people think about it?
2. How popular is this book right now?
3. What are additional relevant links for this book?
-
8/8/2019 How to Run Your Startup on Amazon Web Services Presentation
31/36
AdaptiveBlue & AWS
Background
One of the first companies to use AWS
Started with using S3
Now using S3, SimpleDB, EC2 and
Commerce Service
-
8/8/2019 How to Run Your Startup on Amazon Web Services Presentation
32/36
AdaptiveBlue AWS ArchitectureWeb Browser1 Web Browser N
SimpleDB
EC2
S3
WS1
LB
WSn WS1
LB
WSn
-
8/8/2019 How to Run Your Startup on Amazon Web Services Presentation
33/36
AdaptiveBlue & AWSOn EC2:
We are running web service and load balancers
On S3: We are storing XML representation of books, music,
movies, stocks, wines, etc. as well as XML of user profiles.
On SimpleDB:
Records of interactions between users and things they arelooking at, liking or commenting.
Records that map user ids to other services
Records that map between our internal object keys andURLs for this object around the web.
-
8/8/2019 How to Run Your Startup on Amazon Web Services Presentation
34/36
Noteworthy usage
We turn SimpleDB into relational database via redundancy.
We have person and object domains. Each time when the userinteracts with an object we write a record withUSERNAME/OBJECT_KEY pair into 2 domains - one objectdomain, one person domain.
This way we can instantly retrieve recent objects for a personand recent people for each object.
-
8/8/2019 How to Run Your Startup on Amazon Web Services Presentation
35/36
AdaptiveBlue
Recommends AWS
We love Amazon Web Services and couldnt have built AdaptiveBluewithout them.
Thanks to AWS we scale today to hundreds of thousands of users .
Our current costs are < 2K per month.
Amazon team has been nothing less than outstanding in supporting us andhelping us architect correct solutions.
We recommend AWS to everyone who asks, because we believe that itoffers unprecedented head start, scalability and savings.
-
8/8/2019 How to Run Your Startup on Amazon Web Services Presentation
36/36
Amazon Web Services Resources
All you need - basic info, getting
started, pricing, tutorials, code,forums - all on AWS home page:
http://tinyurl.com/ynfsn6