SlideShare a Scribd company logo
1 of 22
Download to read offline
High-Availability: cache and queue 
2014-07-24 
Truc Le - afterlastangel@gmail.com
Executive Summary 
• The objective of this presentation is fundamental web 
development method using the cache. 
• Optimization code to reduce resource cost and make 
website faster. 
• Amazon Web Services for Cache and Queue 
2014-07-24 High-Availability: cache and queue
Outline 
• Cache 
• Simple example & Benchmark 
• Queue & Write behind 
• Simple worker demo 
• Amazon Web Services for Cache and Queue 
• Scalability 
2014-07-24 High-Availability: cache and queue
Caching 
• Cache can help reduce database loads. 
• Instead of going to the database, data can be loaded from 
in-memory cache 
• Times faster than database. 
2014-07-24 High-Availability: cache and queue
Simple implementation 
No cache 
2014-07-24 High-Availability: cache and queue
Get cache 
2014-07-24 High-Availability: cache and queue
Use & Set cache 
Expired time 60 seconds 
Serialize and & Unserialize for object storage 
2014-07-24 High-Availability: cache and queue
Benchmark method 
Tool : siege 
API URL : 20 
Deployment on AWS 
EC2 (ubuntu) : t2.micro 
RDS (mysql) : db.t1.micro 
ElasticCache (redis) : cache.t1.micro 
2014-07-24 High-Availability: cache and queue
Result 
Concurrent User: 50 - Delay: 10 - Repeat: 2 
Cache vs (No cache) 
Elapsed time : 20.13 secs ( 27.97) 
Response time : 0.93 secs ( 4.23 ) 
Transaction rate : 4.97 trans/sec ( 3.58 ) 
2014-07-24 High-Availability: cache and queue
Result 
Concurrent User: 100 - Delay: 10 - Repeat: 2 
Cache vs (No cache) 
Elapsed time : 30.97 secs ( 27.10) ??? 
Response time : 5 secs ( 3.84 ) ??? 
Transaction rate : 6.46 trans/sec ( 7.38 ) ??? 
2014-07-24 High-Availability: cache and queue
Log details 
2014-07-24 High-Availability: cache and queue 
96 empty 
responses
Conclusion 
- Too many connections (>32) 
- To increase max connections need larger RDS 
Cache helps: 
● Save money 
● More concurrent user 
● Faster delivery 
2014-07-24 High-Availability: cache and queue
What could be cached? 
• Database query 
• Variable & Object 
• View page & Template 
• API 
2014-07-24 High-Availability: cache and queue
Redis is more than cache 
• It's a "NoSQL" key-value data stores 
• It's a data structures server 
Applications: Counting stuff, Pub/Sub, Queues, Real time 
analysis, Leaderboards and related problems ... 
2014-07-24 High-Availability: cache and queue
Queue & Write-Behind 
● Offload database writes 
● Spread writes out to flatten peaks 
● Consolidate multiple writes into fewer database writes 
● Being disconnected from the DB will let the frontend keep 
running if the DB is down! 
2014-07-24 High-Availability: cache and queue
Architecture 
2014-07-24 High-Availability: cache and queue
Compare with traditional 
2014-07-24 High-Availability: cache and queue
Running demo queue 
2014-07-24 High-Availability: cache and queue
Amazon ElasticCache 
• Saves administrative cost 
• Provides replication features for the Redis engine 
• Automatically detects and replaces failed nodes 
• Availability Zone redundancy 
2014-07-24 High-Availability: cache and queue
2014-07-24 High-Availability: cache and queue
Amazon Simple Queue Service 
• Runs within Amazon’s high-availability data centers 
• All messages are stored redundantly across multiple 
servers and data centers 
• Unlimited number of services to read and write 
• Unlimited number of messages at any time 
• Inexpensive 
2014-07-24 High-Availability: cache and queue
Scalability 
2014-07-24 High-Availability: cache and queue

More Related Content

What's hot

Kafka Summit SF 2017 - Infrastructure for Streaming Applications
Kafka Summit SF 2017 - Infrastructure for Streaming Applications Kafka Summit SF 2017 - Infrastructure for Streaming Applications
Kafka Summit SF 2017 - Infrastructure for Streaming Applications confluent
 
Redis for horizontally scaled data processing at jFrog bintray
Redis for horizontally scaled data processing at jFrog bintrayRedis for horizontally scaled data processing at jFrog bintray
Redis for horizontally scaled data processing at jFrog bintrayRedis Labs
 
Learn WordPress - Live Session 2 Slides
Learn WordPress - Live Session 2 SlidesLearn WordPress - Live Session 2 Slides
Learn WordPress - Live Session 2 SlidesAhmed Mohammed Nagdy
 
Using Redis at Facebook
Using Redis at FacebookUsing Redis at Facebook
Using Redis at FacebookRedis Labs
 
Redis Developers Day 2014 - Redis Labs Talks
Redis Developers Day 2014 - Redis Labs TalksRedis Developers Day 2014 - Redis Labs Talks
Redis Developers Day 2014 - Redis Labs TalksRedis Labs
 
HBaseCon 2015 General Session: Zen - A Graph Data Model on HBase
HBaseCon 2015 General Session: Zen - A Graph Data Model on HBaseHBaseCon 2015 General Session: Zen - A Graph Data Model on HBase
HBaseCon 2015 General Session: Zen - A Graph Data Model on HBaseHBaseCon
 
World Wide Web Caching
World Wide Web CachingWorld Wide Web Caching
World Wide Web Cachingersanbilik
 
Redis Labs and SQL Server
Redis Labs and SQL ServerRedis Labs and SQL Server
Redis Labs and SQL ServerLynn Langit
 
Roshan Bhattarai: Scaling WordPress for high traffic sites
Roshan Bhattarai: Scaling WordPress for high traffic sitesRoshan Bhattarai: Scaling WordPress for high traffic sites
Roshan Bhattarai: Scaling WordPress for high traffic siteswpnepal
 
Scaling wordpress for high traffic
Scaling wordpress for high trafficScaling wordpress for high traffic
Scaling wordpress for high trafficRoshan Bhattarai
 
Migratory Workloads Across Clouds with Nomad
Migratory Workloads Across Clouds with NomadMigratory Workloads Across Clouds with Nomad
Migratory Workloads Across Clouds with NomadPhilip Watts
 
Kenshoo - Use Hadoop, One Week, No Coding
Kenshoo - Use Hadoop, One Week, No CodingKenshoo - Use Hadoop, One Week, No Coding
Kenshoo - Use Hadoop, One Week, No CodingMapR Technologies
 
Scylla Summit 2022: New AWS Instances Perfect for ScyllaDB
Scylla Summit 2022: New AWS Instances Perfect for ScyllaDBScylla Summit 2022: New AWS Instances Perfect for ScyllaDB
Scylla Summit 2022: New AWS Instances Perfect for ScyllaDBScyllaDB
 
Understanding Web Cache
Understanding Web CacheUnderstanding Web Cache
Understanding Web CacheProdigyView
 
What to consider when monitoring microservices
What to consider when monitoring microservicesWhat to consider when monitoring microservices
What to consider when monitoring microservicesParticular Software
 
Using flash on the server side
Using flash on the server sideUsing flash on the server side
Using flash on the server sideHoward Marks
 
RedisConf17 - Home Depot - Turbo charging existing applications with Redis
RedisConf17 - Home Depot - Turbo charging existing applications with RedisRedisConf17 - Home Depot - Turbo charging existing applications with Redis
RedisConf17 - Home Depot - Turbo charging existing applications with RedisRedis Labs
 
Scaling WordPress on DigitalOcean
Scaling WordPress on DigitalOceanScaling WordPress on DigitalOcean
Scaling WordPress on DigitalOceanServerGuy
 

What's hot (20)

Kafka Summit SF 2017 - Infrastructure for Streaming Applications
Kafka Summit SF 2017 - Infrastructure for Streaming Applications Kafka Summit SF 2017 - Infrastructure for Streaming Applications
Kafka Summit SF 2017 - Infrastructure for Streaming Applications
 
“Kick-off with Scale in Mind” by Yousef Wadi
“Kick-off with Scale in Mind” by Yousef Wadi“Kick-off with Scale in Mind” by Yousef Wadi
“Kick-off with Scale in Mind” by Yousef Wadi
 
Redis for horizontally scaled data processing at jFrog bintray
Redis for horizontally scaled data processing at jFrog bintrayRedis for horizontally scaled data processing at jFrog bintray
Redis for horizontally scaled data processing at jFrog bintray
 
Learn WordPress - Live Session 2 Slides
Learn WordPress - Live Session 2 SlidesLearn WordPress - Live Session 2 Slides
Learn WordPress - Live Session 2 Slides
 
Using Redis at Facebook
Using Redis at FacebookUsing Redis at Facebook
Using Redis at Facebook
 
Redis Developers Day 2014 - Redis Labs Talks
Redis Developers Day 2014 - Redis Labs TalksRedis Developers Day 2014 - Redis Labs Talks
Redis Developers Day 2014 - Redis Labs Talks
 
HBaseCon 2015 General Session: Zen - A Graph Data Model on HBase
HBaseCon 2015 General Session: Zen - A Graph Data Model on HBaseHBaseCon 2015 General Session: Zen - A Graph Data Model on HBase
HBaseCon 2015 General Session: Zen - A Graph Data Model on HBase
 
World Wide Web Caching
World Wide Web CachingWorld Wide Web Caching
World Wide Web Caching
 
Redis Labs and SQL Server
Redis Labs and SQL ServerRedis Labs and SQL Server
Redis Labs and SQL Server
 
Roshan Bhattarai: Scaling WordPress for high traffic sites
Roshan Bhattarai: Scaling WordPress for high traffic sitesRoshan Bhattarai: Scaling WordPress for high traffic sites
Roshan Bhattarai: Scaling WordPress for high traffic sites
 
Scaling wordpress for high traffic
Scaling wordpress for high trafficScaling wordpress for high traffic
Scaling wordpress for high traffic
 
Migratory Workloads Across Clouds with Nomad
Migratory Workloads Across Clouds with NomadMigratory Workloads Across Clouds with Nomad
Migratory Workloads Across Clouds with Nomad
 
Kenshoo - Use Hadoop, One Week, No Coding
Kenshoo - Use Hadoop, One Week, No CodingKenshoo - Use Hadoop, One Week, No Coding
Kenshoo - Use Hadoop, One Week, No Coding
 
Scylla Summit 2022: New AWS Instances Perfect for ScyllaDB
Scylla Summit 2022: New AWS Instances Perfect for ScyllaDBScylla Summit 2022: New AWS Instances Perfect for ScyllaDB
Scylla Summit 2022: New AWS Instances Perfect for ScyllaDB
 
Understanding Web Cache
Understanding Web CacheUnderstanding Web Cache
Understanding Web Cache
 
What to consider when monitoring microservices
What to consider when monitoring microservicesWhat to consider when monitoring microservices
What to consider when monitoring microservices
 
Using flash on the server side
Using flash on the server sideUsing flash on the server side
Using flash on the server side
 
RedisConf17 - Home Depot - Turbo charging existing applications with Redis
RedisConf17 - Home Depot - Turbo charging existing applications with RedisRedisConf17 - Home Depot - Turbo charging existing applications with Redis
RedisConf17 - Home Depot - Turbo charging existing applications with Redis
 
Caching on the web
Caching on the webCaching on the web
Caching on the web
 
Scaling WordPress on DigitalOcean
Scaling WordPress on DigitalOceanScaling WordPress on DigitalOcean
Scaling WordPress on DigitalOcean
 

Similar to High availability system cache and queue - Write behind

Cloud - High Availability @ Low Cost - Workshop - Gurpreet ahuja
Cloud - High Availability @ Low Cost - Workshop - Gurpreet ahujaCloud - High Availability @ Low Cost - Workshop - Gurpreet ahuja
Cloud - High Availability @ Low Cost - Workshop - Gurpreet ahujaResellerClub
 
AWS Partner Webcast - Hadoop in the Cloud: Unlocking the Potential of Big Dat...
AWS Partner Webcast - Hadoop in the Cloud: Unlocking the Potential of Big Dat...AWS Partner Webcast - Hadoop in the Cloud: Unlocking the Potential of Big Dat...
AWS Partner Webcast - Hadoop in the Cloud: Unlocking the Potential of Big Dat...Amazon Web Services
 
Speeding Up The Snail
Speeding Up The SnailSpeeding Up The Snail
Speeding Up The SnailMarcus Deglos
 
SPSUtah 2014 SharePoint 2013 Performance (Admin)
SPSUtah 2014 SharePoint 2013 Performance (Admin)SPSUtah 2014 SharePoint 2013 Performance (Admin)
SPSUtah 2014 SharePoint 2013 Performance (Admin)Brian Culver
 
Couchbase Singapore Meetup #2: Why Developing with Couchbase is easy !!
Couchbase Singapore Meetup #2:  Why Developing with Couchbase is easy !! Couchbase Singapore Meetup #2:  Why Developing with Couchbase is easy !!
Couchbase Singapore Meetup #2: Why Developing with Couchbase is easy !! Karthik Babu Sekar
 
Sql Start! 2020 - SQL Server Lift & Shift su Azure
Sql Start! 2020 - SQL Server Lift & Shift su AzureSql Start! 2020 - SQL Server Lift & Shift su Azure
Sql Start! 2020 - SQL Server Lift & Shift su AzureMarco Obinu
 
Couchbase Chennai Meetup: Developing with Couchbase- made easy
Couchbase Chennai Meetup:  Developing with Couchbase- made easyCouchbase Chennai Meetup:  Developing with Couchbase- made easy
Couchbase Chennai Meetup: Developing with Couchbase- made easyKarthik Babu Sekar
 
SQL Server Lift & Shift on Azure - SQL Saturday 921
SQL Server Lift & Shift on Azure - SQL Saturday 921SQL Server Lift & Shift on Azure - SQL Saturday 921
SQL Server Lift & Shift on Azure - SQL Saturday 921Marco Obinu
 
Building Scalable Applications with Microsoft Azure
Building Scalable Applications with Microsoft AzureBuilding Scalable Applications with Microsoft Azure
Building Scalable Applications with Microsoft AzureFisnik Doko
 
AWS Summit Sydney | 50GB Mailboxes for 50,000 Users on AWS? Easy - Session Sp...
AWS Summit Sydney | 50GB Mailboxes for 50,000 Users on AWS? Easy - Session Sp...AWS Summit Sydney | 50GB Mailboxes for 50,000 Users on AWS? Easy - Session Sp...
AWS Summit Sydney | 50GB Mailboxes for 50,000 Users on AWS? Easy - Session Sp...Amazon Web Services
 
Introduction to memcached
Introduction to memcachedIntroduction to memcached
Introduction to memcachedJurriaan Persyn
 
High-Performance Big Data Analytics with RDMA over NVM and NVMe-SSD
High-Performance Big Data Analytics with RDMA over NVM and NVMe-SSDHigh-Performance Big Data Analytics with RDMA over NVM and NVMe-SSD
High-Performance Big Data Analytics with RDMA over NVM and NVMe-SSDinside-BigData.com
 
Choosing right data store & processing
Choosing right data store & processingChoosing right data store & processing
Choosing right data store & processingGovind Kanshi
 
Best Practices for Administering Hadoop with Hortonworks Data Platform (HDP) ...
Best Practices for Administering Hadoop with Hortonworks Data Platform (HDP) ...Best Practices for Administering Hadoop with Hortonworks Data Platform (HDP) ...
Best Practices for Administering Hadoop with Hortonworks Data Platform (HDP) ...SpringPeople
 
Getting Started with Amazon Redshift
Getting Started with Amazon RedshiftGetting Started with Amazon Redshift
Getting Started with Amazon RedshiftAmazon Web Services
 
Getting Started with Amazon Redshift
Getting Started with Amazon RedshiftGetting Started with Amazon Redshift
Getting Started with Amazon RedshiftAmazon Web Services
 
RapidScale CloudServer
RapidScale CloudServerRapidScale CloudServer
RapidScale CloudServerRapidScale
 
More Cache for Less Cash (DevLink 2014)
More Cache for Less Cash (DevLink 2014)More Cache for Less Cash (DevLink 2014)
More Cache for Less Cash (DevLink 2014)Michael Collier
 
What's New in Apache Hive 3.0?
What's New in Apache Hive 3.0?What's New in Apache Hive 3.0?
What's New in Apache Hive 3.0?DataWorks Summit
 
What's New in Apache Hive 3.0 - Tokyo
What's New in Apache Hive 3.0 - TokyoWhat's New in Apache Hive 3.0 - Tokyo
What's New in Apache Hive 3.0 - TokyoDataWorks Summit
 

Similar to High availability system cache and queue - Write behind (20)

Cloud - High Availability @ Low Cost - Workshop - Gurpreet ahuja
Cloud - High Availability @ Low Cost - Workshop - Gurpreet ahujaCloud - High Availability @ Low Cost - Workshop - Gurpreet ahuja
Cloud - High Availability @ Low Cost - Workshop - Gurpreet ahuja
 
AWS Partner Webcast - Hadoop in the Cloud: Unlocking the Potential of Big Dat...
AWS Partner Webcast - Hadoop in the Cloud: Unlocking the Potential of Big Dat...AWS Partner Webcast - Hadoop in the Cloud: Unlocking the Potential of Big Dat...
AWS Partner Webcast - Hadoop in the Cloud: Unlocking the Potential of Big Dat...
 
Speeding Up The Snail
Speeding Up The SnailSpeeding Up The Snail
Speeding Up The Snail
 
SPSUtah 2014 SharePoint 2013 Performance (Admin)
SPSUtah 2014 SharePoint 2013 Performance (Admin)SPSUtah 2014 SharePoint 2013 Performance (Admin)
SPSUtah 2014 SharePoint 2013 Performance (Admin)
 
Couchbase Singapore Meetup #2: Why Developing with Couchbase is easy !!
Couchbase Singapore Meetup #2:  Why Developing with Couchbase is easy !! Couchbase Singapore Meetup #2:  Why Developing with Couchbase is easy !!
Couchbase Singapore Meetup #2: Why Developing with Couchbase is easy !!
 
Sql Start! 2020 - SQL Server Lift & Shift su Azure
Sql Start! 2020 - SQL Server Lift & Shift su AzureSql Start! 2020 - SQL Server Lift & Shift su Azure
Sql Start! 2020 - SQL Server Lift & Shift su Azure
 
Couchbase Chennai Meetup: Developing with Couchbase- made easy
Couchbase Chennai Meetup:  Developing with Couchbase- made easyCouchbase Chennai Meetup:  Developing with Couchbase- made easy
Couchbase Chennai Meetup: Developing with Couchbase- made easy
 
SQL Server Lift & Shift on Azure - SQL Saturday 921
SQL Server Lift & Shift on Azure - SQL Saturday 921SQL Server Lift & Shift on Azure - SQL Saturday 921
SQL Server Lift & Shift on Azure - SQL Saturday 921
 
Building Scalable Applications with Microsoft Azure
Building Scalable Applications with Microsoft AzureBuilding Scalable Applications with Microsoft Azure
Building Scalable Applications with Microsoft Azure
 
AWS Summit Sydney | 50GB Mailboxes for 50,000 Users on AWS? Easy - Session Sp...
AWS Summit Sydney | 50GB Mailboxes for 50,000 Users on AWS? Easy - Session Sp...AWS Summit Sydney | 50GB Mailboxes for 50,000 Users on AWS? Easy - Session Sp...
AWS Summit Sydney | 50GB Mailboxes for 50,000 Users on AWS? Easy - Session Sp...
 
Introduction to memcached
Introduction to memcachedIntroduction to memcached
Introduction to memcached
 
High-Performance Big Data Analytics with RDMA over NVM and NVMe-SSD
High-Performance Big Data Analytics with RDMA over NVM and NVMe-SSDHigh-Performance Big Data Analytics with RDMA over NVM and NVMe-SSD
High-Performance Big Data Analytics with RDMA over NVM and NVMe-SSD
 
Choosing right data store & processing
Choosing right data store & processingChoosing right data store & processing
Choosing right data store & processing
 
Best Practices for Administering Hadoop with Hortonworks Data Platform (HDP) ...
Best Practices for Administering Hadoop with Hortonworks Data Platform (HDP) ...Best Practices for Administering Hadoop with Hortonworks Data Platform (HDP) ...
Best Practices for Administering Hadoop with Hortonworks Data Platform (HDP) ...
 
Getting Started with Amazon Redshift
Getting Started with Amazon RedshiftGetting Started with Amazon Redshift
Getting Started with Amazon Redshift
 
Getting Started with Amazon Redshift
Getting Started with Amazon RedshiftGetting Started with Amazon Redshift
Getting Started with Amazon Redshift
 
RapidScale CloudServer
RapidScale CloudServerRapidScale CloudServer
RapidScale CloudServer
 
More Cache for Less Cash (DevLink 2014)
More Cache for Less Cash (DevLink 2014)More Cache for Less Cash (DevLink 2014)
More Cache for Less Cash (DevLink 2014)
 
What's New in Apache Hive 3.0?
What's New in Apache Hive 3.0?What's New in Apache Hive 3.0?
What's New in Apache Hive 3.0?
 
What's New in Apache Hive 3.0 - Tokyo
What's New in Apache Hive 3.0 - TokyoWhat's New in Apache Hive 3.0 - Tokyo
What's New in Apache Hive 3.0 - Tokyo
 

More from Le Kien Truc

Question and Answer - ubuntu-vn - Idea
Question and Answer - ubuntu-vn - IdeaQuestion and Answer - ubuntu-vn - Idea
Question and Answer - ubuntu-vn - IdeaLe Kien Truc
 
Webanalytics with haddop and Hive
Webanalytics with haddop and HiveWebanalytics with haddop and Hive
Webanalytics with haddop and HiveLe Kien Truc
 
Piwik analytics introduction at Fossasia2014
Piwik analytics introduction at Fossasia2014Piwik analytics introduction at Fossasia2014
Piwik analytics introduction at Fossasia2014Le Kien Truc
 
Realtime system with pushpin fanout, controlling your devices
Realtime system with pushpin fanout, controlling your devicesRealtime system with pushpin fanout, controlling your devices
Realtime system with pushpin fanout, controlling your devicesLe Kien Truc
 
Aws cloud infrastructure and cost estimation for angular site
Aws cloud infrastructure and cost estimation for angular siteAws cloud infrastructure and cost estimation for angular site
Aws cloud infrastructure and cost estimation for angular siteLe Kien Truc
 
Wordpress site scaling architecture on cloud infrastructure with AWS
Wordpress site scaling architecture on cloud infrastructure with AWSWordpress site scaling architecture on cloud infrastructure with AWS
Wordpress site scaling architecture on cloud infrastructure with AWSLe Kien Truc
 
Large scale web socket system with AWS and Web socket
Large scale web socket system with AWS and Web socketLarge scale web socket system with AWS and Web socket
Large scale web socket system with AWS and Web socketLe Kien Truc
 
Interactive image discovery
Interactive image discoveryInteractive image discovery
Interactive image discoveryLe Kien Truc
 
FPT University - Capstone project - Using QR Code to prevent fake products
FPT University - Capstone project - Using QR Code to prevent fake productsFPT University - Capstone project - Using QR Code to prevent fake products
FPT University - Capstone project - Using QR Code to prevent fake productsLe Kien Truc
 

More from Le Kien Truc (9)

Question and Answer - ubuntu-vn - Idea
Question and Answer - ubuntu-vn - IdeaQuestion and Answer - ubuntu-vn - Idea
Question and Answer - ubuntu-vn - Idea
 
Webanalytics with haddop and Hive
Webanalytics with haddop and HiveWebanalytics with haddop and Hive
Webanalytics with haddop and Hive
 
Piwik analytics introduction at Fossasia2014
Piwik analytics introduction at Fossasia2014Piwik analytics introduction at Fossasia2014
Piwik analytics introduction at Fossasia2014
 
Realtime system with pushpin fanout, controlling your devices
Realtime system with pushpin fanout, controlling your devicesRealtime system with pushpin fanout, controlling your devices
Realtime system with pushpin fanout, controlling your devices
 
Aws cloud infrastructure and cost estimation for angular site
Aws cloud infrastructure and cost estimation for angular siteAws cloud infrastructure and cost estimation for angular site
Aws cloud infrastructure and cost estimation for angular site
 
Wordpress site scaling architecture on cloud infrastructure with AWS
Wordpress site scaling architecture on cloud infrastructure with AWSWordpress site scaling architecture on cloud infrastructure with AWS
Wordpress site scaling architecture on cloud infrastructure with AWS
 
Large scale web socket system with AWS and Web socket
Large scale web socket system with AWS and Web socketLarge scale web socket system with AWS and Web socket
Large scale web socket system with AWS and Web socket
 
Interactive image discovery
Interactive image discoveryInteractive image discovery
Interactive image discovery
 
FPT University - Capstone project - Using QR Code to prevent fake products
FPT University - Capstone project - Using QR Code to prevent fake productsFPT University - Capstone project - Using QR Code to prevent fake products
FPT University - Capstone project - Using QR Code to prevent fake products
 

Recently uploaded

%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park masabamasaba
 
Artyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptxArtyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptxAnnaArtyushina1
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension AidPhilip Schwarz
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is insideshinachiaurasa2
 
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...masabamasaba
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrainmasabamasaba
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park masabamasaba
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...Shane Coughlan
 
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...WSO2
 
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...SelfMade bd
 
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024VictoriaMetrics
 
Announcing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareAnnouncing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareJim McKeeth
 
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyviewmasabamasaba
 
%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in sowetomasabamasaba
 
Architecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastArchitecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastPapp Krisztián
 
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...Jittipong Loespradit
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Steffen Staab
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...masabamasaba
 

Recently uploaded (20)

%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
 
Artyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptxArtyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptx
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
 
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
 
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
 
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
 
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
 
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
 
Announcing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareAnnouncing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK Software
 
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
 
%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto
 
Architecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastArchitecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the past
 
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
 

High availability system cache and queue - Write behind

  • 1. High-Availability: cache and queue 2014-07-24 Truc Le - afterlastangel@gmail.com
  • 2. Executive Summary • The objective of this presentation is fundamental web development method using the cache. • Optimization code to reduce resource cost and make website faster. • Amazon Web Services for Cache and Queue 2014-07-24 High-Availability: cache and queue
  • 3. Outline • Cache • Simple example & Benchmark • Queue & Write behind • Simple worker demo • Amazon Web Services for Cache and Queue • Scalability 2014-07-24 High-Availability: cache and queue
  • 4. Caching • Cache can help reduce database loads. • Instead of going to the database, data can be loaded from in-memory cache • Times faster than database. 2014-07-24 High-Availability: cache and queue
  • 5. Simple implementation No cache 2014-07-24 High-Availability: cache and queue
  • 6. Get cache 2014-07-24 High-Availability: cache and queue
  • 7. Use & Set cache Expired time 60 seconds Serialize and & Unserialize for object storage 2014-07-24 High-Availability: cache and queue
  • 8. Benchmark method Tool : siege API URL : 20 Deployment on AWS EC2 (ubuntu) : t2.micro RDS (mysql) : db.t1.micro ElasticCache (redis) : cache.t1.micro 2014-07-24 High-Availability: cache and queue
  • 9. Result Concurrent User: 50 - Delay: 10 - Repeat: 2 Cache vs (No cache) Elapsed time : 20.13 secs ( 27.97) Response time : 0.93 secs ( 4.23 ) Transaction rate : 4.97 trans/sec ( 3.58 ) 2014-07-24 High-Availability: cache and queue
  • 10. Result Concurrent User: 100 - Delay: 10 - Repeat: 2 Cache vs (No cache) Elapsed time : 30.97 secs ( 27.10) ??? Response time : 5 secs ( 3.84 ) ??? Transaction rate : 6.46 trans/sec ( 7.38 ) ??? 2014-07-24 High-Availability: cache and queue
  • 11. Log details 2014-07-24 High-Availability: cache and queue 96 empty responses
  • 12. Conclusion - Too many connections (>32) - To increase max connections need larger RDS Cache helps: ● Save money ● More concurrent user ● Faster delivery 2014-07-24 High-Availability: cache and queue
  • 13. What could be cached? • Database query • Variable & Object • View page & Template • API 2014-07-24 High-Availability: cache and queue
  • 14. Redis is more than cache • It's a "NoSQL" key-value data stores • It's a data structures server Applications: Counting stuff, Pub/Sub, Queues, Real time analysis, Leaderboards and related problems ... 2014-07-24 High-Availability: cache and queue
  • 15. Queue & Write-Behind ● Offload database writes ● Spread writes out to flatten peaks ● Consolidate multiple writes into fewer database writes ● Being disconnected from the DB will let the frontend keep running if the DB is down! 2014-07-24 High-Availability: cache and queue
  • 17. Compare with traditional 2014-07-24 High-Availability: cache and queue
  • 18. Running demo queue 2014-07-24 High-Availability: cache and queue
  • 19. Amazon ElasticCache • Saves administrative cost • Provides replication features for the Redis engine • Automatically detects and replaces failed nodes • Availability Zone redundancy 2014-07-24 High-Availability: cache and queue
  • 21. Amazon Simple Queue Service • Runs within Amazon’s high-availability data centers • All messages are stored redundantly across multiple servers and data centers • Unlimited number of services to read and write • Unlimited number of messages at any time • Inexpensive 2014-07-24 High-Availability: cache and queue