Hosting

General Architecture

General Architecture

Zento's hosting architecture is built in the Cloud, with the clear goal of achieving performance, scalability, reliability, security and financial efficiency.

Traditional hosting runs the shop on a single dedicated or virtual server: all incoming requests (frontend, backend, api) and heavy background jobs (product updates) are handled by the same server. This setup has several problems like scalability and reliability, which we covered in the What is Cloud Hosting article.

All of Zento's hosting components are created with scalability and redundancy in mind. The application architecture consists of the following components:

  • a PWA frontend

  • Magento 2 backend

  • storage, database & caching

  • image resizing service

Zento uses AWS's state-of-the-art CDN: CloudFront. Depending on what URL is requested the call is routed as in the following diagram:

Zento Routing Architecture
  • Magento 2 GraphQL API & Magento admin ⇒ Kubernetes (EKS)

  • JS, CSS and other static images ⇒ S3

  • Media files incl. product images and images from content ⇒ S3

  • Resize & optimized images ⇒ Lambda (Resizer)

  • All other requests ⇒ Lambda (SSR)

All the calls are protected by AWS Web Application Firewall (WAF) to mitigate against common web exploits that can affect availability, compromise security, or consume excessive resources.

For all traffic, detailed access logs, including response time, User Agent and cache hit/miss, are stored in S3 and can be later analysed or exported.

Server Side Rendering

When a page is loaded, the user's browser loads the page's HTML, the JavaScript files that contain the application functionality, the CSS that styles the application and of course the images.

Although the JS part of the application (which is the actual PWA) is quite capable of rendering any page of the website on its own, it is important that the initial HTML response contains the entire page rendered exactly as the browser would. This allows the browser to display the styled page to the user without having to wait for the scripts to finish loading. This part is called Server Side Rendering, or SSR for short.

These SSR page loads are processed using AWS Lambda, AWS's Serverless Function-as-a-Service implementation. This results in perfect scalability, while paying only for the actual execution.

You can read more about this on PWA on Lambda

Magento 2 on Kubernetes

API calls made by the PWA or admin access to the Magento 2 backend interface are routed to the Kubernetes cluster running on AWS EKS.

Each shop has several pods running on different nodes that are load balanced to serve all incoming requests. When the traffic spikes, new pods are automatically created in a few seconds and after the traffic cools down, they are removed automatically. At all times, a minimal set of pods are kept for resiliency, so in the rare case of hardware failures, the shop maintains a perfect uptime.

You can read more about this on M2 on Kubernetes

Resizing & Optimising Images

Resized and optimised images in modern formats are significantly smaller in size than their larger uncompressed versions, so for best performance and SEO, it is critical to serve optimized images at their correct size and also serve them in modern formats so modern browsers can take advantage of them.

Traditional solutions might resize images and even optimize them in the process, but it's often the case that images displayed on mobile devices are larger in size than needed, resulting in wasted bandwidth and performance penalties. Most solutions also don't convert images from their source format (JPG or PNG) to modern formats (WEBP or AVIF) and modern formats can't be used exclusively since not all browsers support them.

Zento's PWA selectively offers the browser images in both traditional and modern formats and in all sizes needed depending on the user's screen size and pixel density; when the browser decides to load the image at a certain size and format, the resized, optimized and modern-format image is automatically served to the user. The resize is done with a serverless Lambda job and is cached on S3 and CloudFront CDN.

The result is a simple management process for the merchant, a seamless experience for the user and optimal performance scores.

Conclusion

By choosing Zento as your eCommerce solution, you get performance, scalability, reliability and security for your shop, so that you increase conversion and stay online even in the busiest periods, while also decreasing risks associated with security breaches.

Want to find out more?

Contact Us

This website uses cookies

We use cookies to personalize content and ads, to provide social media features and to analyze our traffic.

We also share information about your use of our site with our social media, advertising and analytics partners, who may combine it with other information you have provided or collected from using their services.

You agree to our cookies if you continue to use our website.