5. Registration system
We offer registration infrastructure
That must be highly scalable
The infrastructure has very high load picks
6. Registration system
Flow:
user authenticates
user send a registration request (once an hour)
application saves it
someone manually accept / reject the request
email is sent
in case of accept - allow print of confirmation (auto generated
image)
18. Choosing Database(SQL)
EC2 - might not be the first choose for DB
You pay for compute, storage, ram and etc…
Storage is expensive
You have to maintain the DB
Taking responsibility on backups
You have an entire machine only to get a connection
string
19. Choosing Database(SQL)
RDS - Rational Database Services
All you get is a connection string
Auto maintenance
Auto backups
Replication support
Paying for storage (only what you use vs EC2)
Auto address swap in case of failure
22. EC2 - Auto Scale
Define a threshold using CloudWatch
Add instance when event occur
Remove instance when event occur
Define min/max/desired amount of instances
Register for notification (load tests…)
23. EC2 - Load Balancer
The Auto Scale will create instances upon high loads
The Load Balancer will keep an equal load in the
instances
very easy to define
25. ElasticCache
Few EC2 instance may require high speed data
sharing
Distributed cache would solve that
A key value pair
Expiration is supported (once an hour)
When new instance is created - state is easily
preserved
33. Cloud Storage Solutions
EC2
high cost
better performance when in the same machine
S3
low cost
distributed between different services
Glacier
low performance - archive
Which one would you use?
34. S3
S3
Separated into buckets
Each item can be up to 5 terabyte
Support event notification (upon item add send
email)
Encryption support
35. S3 - SDK
var params = {
Bucket: 'STRING_VALUE', /* required */
Key: 'STRING_VALUE', /* required */
Body: new Buffer('...') || 'STRING_VALUE' || streamObject,
Expires: new Date || 'Wed Dec 31 1969 16:00:00 GMT-0800 (PST)' || 123456789,
Metadata: {
someKey: 'STRING_VALUE',
}};
s3.putObject(params, function(err, data) {
});