Once you are at scale, it is even more important to focus on costs and run lean on AWS. This talk with explain the various purchasing models available, and will then address how to size your application for AWS. We will take you through various architectural best practices, such as auto-scaling, caching etc. to save costs and run lean by making the best decisions.
9. Let’s review AWS’ pricing concepts…
Pay as you go
Pay less per unit when you use more
Pay even less when you reserve
• Reserved pricing
Pay even less when you architect for cost optimization
• Smart architecting and leveraging AWS managed services
Pay even less as AWS grows
• AWS economies of scale result in continuous price reductions
11. An example
Enterprise software provider – global, started in India
Focused on SaaS for storage, security, collaboration, etc.
Backed by a leading VC
Strong growth – winning customers globally
Focused on profitability & reducing unit costs
Worked closely with the AWS team to optimize its
architecture
16. “Give me 4 fault tolerant algorithms and I
can pick the best one almost with my
eyes closed.
If you then ask me which one is best for
the business, in terms of dollar costs, I
would be clueless...”
Werner Vogels, CTO, Amazon
17. Cost optimization through ‘Cost Aware Architecting’
…by leveraging:Reduce Cost of…
Compute
1. S3 & CloudFront for Caching & Offloading
2. Load Balancing from the start
Storage 4. Storing derivative objects in S3 ‘Reduced Redundancy’
Data Base 5. Read Replicas and/or ElastiCache
Test & Dev 6. A/B Testing for rapid proto-typing
3. Auto-Scaling done Right
18. 1. S3 & CloudFront for Caching & Offloading
• Reduce your compute demand and costs
• Improve end-user experience
• Increase reliability and durability
Cost Aware Architecting to Reduce costs of EC2
19. 1. S3 & CloudFront for Caching & Offloading
Cost Aware Architecting to Reduce costs of EC2
20. 1. S3 & CloudFront for Caching & Offloading
Cost Aware Architecting to Reduce costs of EC2
21. 1. S3 & CloudFront for Caching & Offloading
Cost Aware Architecting to Reduce costs of EC2
22. 1. S3 & CloudFront for Caching & Offloading
Cost Aware Architecting to Reduce costs of EC2
23.
24. 2. Load Balancing from the start
• Ready for massive scale, high reliability
• Uninterrupted growth and evolution
• Stateless and redundant array
Cost Aware Architecting to Reduce costs of EC2
25. 2. Load Balancing from the start
• Ready for massive scale, high reliability
• Uninterrupted growth and evolution
• Stateless and redundant array
Cost Aware Architecting to Reduce costs of EC2
26. 2. Load Balancing from the start
• Ready for massive scale, high reliability
• Uninterrupted growth and evolution
• Stateless and redundant array
Cost Aware Architecting to Reduce costs of EC2
28. 3. Auto-Scaling done Right with Real Time reaction response
• Elastic Load Balancing and (event-driven) Auto Scaling
• Notification of pending news flash (with audible alarm)
• On-demand ramp up of capacity (6 mins.)
• Subscriber alert push delivered
• Mass response traffic handled (followed by ramp down)
Cost Aware Architecting to Reduce costs of EC2
29. 3. Auto-Scaling done Right with Real Time reaction response
Cost Aware Architecting to Reduce costs of EC2
Straits TimesBuuuk
30. 3. Auto-Scaling done Right with Real Time reaction response
Cost Aware Architecting to Reduce costs of EC2
31. 3. Auto-Scaling done Right with Real Time reaction response
Cost Aware Architecting to Reduce costs of EC2
32. 3. Auto-Scaling done Right with Real Time reaction response
Cost Aware Architecting to Reduce costs of EC2
33. 4. Storing derivative objects in S3 ‘Reduced Redundancy’
• Original vs. derived assets : 33% savings
• Single reference and consistency
• Control, accurate logs and tracking
Cost Aware Architecting to Reduce costs of S3
Reduced Redundancy Storage
‘RRS’
34.
35. 5. Read Replicas and/or ElastiCache (‘Database Smarts’)
• Scale out and share work
• Optimal performance, minimize load
• Enhance reliability, ensure data safety
• Cost reduction
Cost Aware Architecting to Reduce costs of DB
36.
37.
38.
39. 6. A/B Testing for rapid proto-typing & innovation
• Inexpensive idea validation
• Seamless switch over and versioning
• Rapid dev / test agility
Cost Aware Architecting to Reduce costs of Test/Dev
51. Web Application
Servers
Sharded
Database
Cache Servers
Internal
Web Services
File Storage
• 80 million objects stored in S3 with
410 terabytes of user data
• 150 EC2 instances in the web tier
• 90 instances for in-memory caching
• 35 instances used for internal
purposes
• 70 master databases with a parallel
set of backup databases in different
regions around the world for
redundancy
52. • Pinterest really understands its traffic patters
• Most traffic happens in the afternoons and evenings
• Significant difference between peak and off-peak traffic
• They are cost-conscious and very AWS savvy
• Which commercial models can we leverage to reduce costs?
• Which architectural best practices can be used to reduce costs?
53. • Reserved Instances– to save on EC2 forbase workload
• Auto-scaling – automated shut down of 40% of instances off-
peak