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

Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...OnePlan Solutions
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesVictorSzoltysek
 
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionIntroducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionOnePlan Solutions
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplatePresentation.STUDIO
 
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 Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfkalichargn70th171
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 
Exploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfExploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfproinshot.com
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerThousandEyes
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️Delhi Call girls
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech studentsHimanshiGarg82
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsAndolasoft Inc
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionSolGuruz
 
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdfAzure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdfryanfarris8
 

Recently uploaded (20)

Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS LiveVip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
 
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionIntroducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
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 Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
Exploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfExploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdf
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.js
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
 
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdfAzure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
 

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