Web Server’s Workload Pull up the Page Serve Read theAssets & XML Media Web server & Database Query Render thethe page Database Build the page on the fly
Performance & Scaling Mantra • Reduce stress on the Web server & DB – Clones [Multiple App Servers & DB Master Slaves] – Caching [Fullpage Caching / Memcache] – Varnish – Move the workload to the Client Side
Empower the Browser• Browsers are Powerful but under utilized.• Offload mundane tasks to the Client Side.• Go Back to the Server only when needed.
In Magento’s Context• JSON output contains Product Catalog along with necessary attributes.• Layered Navigation, Filters, Sorting, keyword Search done 100% Client side on JSON data.• Product Inventory check is an AJAX request to the server.• Add to Cart, Checkout are direct requests to the server.• For Recently Viewed Products, use Local Storage or IndexedDB.
Scalable Architecture REST Web services EC2Web App Web App MagentoBrowser S3 RDS
Insanely Scalable Architecture EC2Web App Server Web App JSON JSONBrowser Media / Images Folder S3 RDS