From request to response, this session will dive deep into identifying, measuring and reducing latency in your stack for lightning fast applications that keep your customers smiling. Learn how to architect for performance and fine tune your apps for speed with real world examples using the services you love: EC2, RDS, DynamoDB and S3.
5. Page load time and average daily searches per user
http://www.webperformancetoday.com/2013/04/10/cloud-connect-2013-web-acceleration-and-front-end-optimization-slides/
6. Page load delay and business metrics
http://www.webperformancetoday.com/2013/04/10/cloud-connect-2013-web-acceleration-and-front-end-optimization-slides/
7. 2.2s 15.4%
reduction in page load time increase in conversion rate
https://blog.mozilla.org/metrics/2010/04/05/firefox-page-load-speed-%E2%80%93-part-ii/
35. Static and dynamic content
Cache dynamic pages (search results).
Use query strings or cookie for cache keys.
Network and Path optimizations accelerate
even unique content.
36. 7
Content delivery
1
2
Web server
3
Application logic
4
Database
5 6
37. 7
Content delivery
1
2
Web server
3
Application logic
4
Database
5 6
45. Load balancer
Web server Web server Web server
Application server Application server Application server
46. Load balancer
Web server Web server Web server
Application server Application server Application server
47. Load balancer
Web server Web server Web server
Application server Application server Application server
48. Decouple your service tiers
Separation of concerns.
Easier to manage.
Drives higher availability.
49. Build for horizontal scale
Decrease request contention.
Reduce capacity planning headaches.
Requires a stateless application architecture.
50. Small things, loosely coupled.
Do one thing, and do it well. The Unix Way.
Take a look at the Unicorn and Rainbows approach.
Asynchronous be default (where possible).
51. Reduce response time.
Concurrency limits can reappear quickly.
Limit impact on performance through rapid scaling.
75. Managing state.
Transient data only.
Web server state, high score tables, etc.
Time consuming task results
(many to many query results).
76. Best practices.
Assume cold cache latency in application architecture.
Set appropriate time-to-live.
Batch requests rather than sequential single.
Architect for cache failure.
82. Scaling IO.
Provision throughput for your app.
Reserved. Available. Elastic.
Available on EBS, Amazon RDS and DynamoDB.
83. Provisioned throughput is consistent.
Consistent, predictable performance.
Relational databases with RDS.
NoSQL stores with DynamoDB.
Relational & NoSQL with EC2 and EBS.
84. Provisioned throughput with RDS.
12.5k IOPS on MySQL.
25k IOPS on Oracle.
10k IOPS on SQL Server.
Provision up to 30k for reduced latency.
85. Provisioned throughput and instance types.
Optimized for provisioned IO storage:
m1.large: 500 Mbps
m1.xlarge, m2.xlarge, m2.4xlarge: 1000 Mbps
86. Provisioned throughput and DynamoDB.
Consistent performance with
unlimited throughput and storage.
Single digital latency.
87. Build for a uniform workload.
Evenly distribute query patterns by key.
Use a wide range of key values.
90. Standard EBS volumes.
Moderate or bursty workloads.
100 IOPS, bursting to hundreds of IOPS.
Bursting is good for boot volumes.
91. Provisioned IOPS with EBS volumes.
Predictable, high performance for I/O-intensive workloads.
2000 IOPS per volume.
Stripe volumes for additional I/O.
Deliver within 10% of the performance, 99.9% of the time.
93. High bandwidth networking
cg1.4xlarge, cc2.8xlarge, hi1.4xlarge, hs1.8xlarge and
cr1.8xlarge run on non-blocking, 10 gigabit networking.
Not EBS-Optimized, but can be used with
provisioned IOPS volumes.
94. High I/O instances
Designed for for high throughput database workloads.
2 x 1 TB SSDs
2 GB/s for reads
1.1 GB/s for writes
95. PVM instances
4 KB random reads: 120K IOPS
4 KB random writes: 10K–80K IOPS
101. 14 rules for faster loading web sites
1. Make fewer HTTP requests. 8. Make JavaScript and CSS External.
2. Use a content delivery network. 9. Reduce DNS lookups.
3. Add an expires header. 10. Minify Javascript.
4. GZIP components. 11. Avoid redirects.
5. Put style sheets at the top. 12. Remove duplicate scripts.
6. Put scripts at the bottom. 13. Configure ETags.
7. Avoid CSS expressions. 14. Make AJAX cacheable.
http://stevesouders.com/hpws/rules.php
102. Front end optimization
7
Content delivery
1
Horizontal scale
2
Instance selection
3
Caching
4
Read capacity Block store
5 6