Language Cloud
international Japan AWS user group
04 December 2013
WHO IS SERGIO ARCOS ?
WHAT IS LANGUAGE CLOUD ?
Full suite for English teachers
to increase learning performance easily
- Teacher uploads content
- Student resolves exercises
- Teacher improves methodology through statistics and metrics
WHY USE AWS ?
- Low-latency from anywhere
- Deploy with minimum number of employee
- Cannot predict our evolution
SaaS business model
I manage AWS, develop our API, ...
High risk associated in a StartUp
We still don't use any reserved instance!!
1. PAST
HAProxy
PHP (Apache + SSL)
MySQL
NodeJS
DynamoDB
ENVIRONMENTS
Colour green means Small instance, else means Micro instance
EC2: `haproxy`
Development
Production
Opsworks: `PHP` * 2 + `NodeJS`
Demo
EC2: `demo`
HANDICAPS
- Fast degradation
- Multiple responsibilities
- Database issues
MySQL limit connections reached
PHP max CPU reached
SSL handled by Apache
No stateless (local caches)
DynamoDB with Pattern Aggregator
New MySQL table by each organization
2. PRESENT
ELB (SSL)
AngularJS
NodeJS
Redis
MySQL
ENVIRONMENTS
Opsworks: `webpage` + `old_version`
Development
Opsworks: `API (NodeJS)` + `APP (nginx)`
EC2: `DevServices`
Production
Opsworks: `API (NodeJS)` + `APP (nginx)`
GraphStats
Cookbook "statsd" deployed in API machines
RedisCache
TextLogs
~80% - <10ms
HipChat
(external)
WorkerStats
Machine for asynchronous tasks (batch)
Each module has custom intervals
- Dashboard (mysql)
- Analytics (mysql)
- Webhooks (Mandrill)
- Patterns (elasticsearch)
Jenkins
(office)
3. FUTURE
Predict bottlenecks
CPU
Just add more machines
(stateless)
I/O (network bandwidth)
(We use 2 connections: Read & Write)
Replication or Sharding in MySQL
(Our ORM allows connect to multiple DBs)
MEMORY
-
Increase machine vertically
- Flush Redis in shorter intervals
- Migrate to Riak, Cassandra, ...
- Change latency by availability
HARD DRIVE
- Data is allocated in S3 buckets (Infinite storage)
- MySQL - 75Mb of 5Gb (Max. 3Pb)
-
Backups are moved out AWS
MEASURE
Thanks!
Any questions?
sergio@languagecloud.co
Language Cloud (Use Case in AWS)
By Sergio Arcos
Language Cloud (Use Case in AWS)
- 2,593