DevOps on Google Cloud Platform for Enterprise-Level Ecommerce

Tech stack: Magento, Google Cloud Computing Services, Apache, PHP-FPM, Centos 7, MariaDB, Google Cloud SQL

Introduction to the Company

Our customer is a fashion retailer in Israel that operates a fashion chain, one of the largest fashion chains in Israel. They market clothing, footwear, jewelry, bags, and fashion accessories. As per the customer’s request, we will keep the name of the company discrete.

Challenge

The online store was created back in 2015 using Magento 1.9.

Due to a large number of goods available for sale, high traffic, and engine core vulnerability, it had numerous performance pitfalls. It’s also worth mentioning that the database size is very large, around 20 GB.

When customers were trying to simply enter a coupon number in the shopping cart, there were cases when the database would launch a query that was not optimal and pull up random information. The requests could take 30–60 seconds and even bring down the database.

The customer was considering migration from MariaDB to Google Cloud SQL.

“The Project was done smooth and successful as usual. This is the second project we have completed together with DevCube. Their DevOps team has done a smooth migration to Google Cloud, fixed core issues, and improved the website speed up to 30%. True professionals, I always have a pleasure to work with.”

CTO, Large E-commerce Company

Solution Delivered

We requested access to Google Cloud Service to find the best way to optimize it. We discovered their infrastructure, what virtual machines they had, and the use of each. We also requested access to the NewRelic system to better understand the greatest vulnerabilities. We found that the problem was in two particularly slow SQL requests that were bringing down the database for 20 seconds, which followed the downtime of the website up to 1 minute.
We uncovered how to optimize Magento 1.9 and also checked configurations of the webserver to be able to increase its productivity.
We made 3 stress tests (for 500, 1000, and 2000 users) to be able to compare the difference in productivity before and after finishing our optimization.
Our team fixed webserver configurations, cleared cache, and completed migration to Google Cloud SQL, which was the most challenging.
We first conducted the dump in the test environment and then, after confirmation, uploaded it to production.
DevCube was also able to find and fix an error in the core of Magento that was also causing the failures.

As the client’s database is extremely large and the server is live, we could not migrate during production operation. We had to operate fast and only during the deep night when there was a possibility to bring down the website without losing the number of users. The total downtime of the website was 1 hour.

We have also tested it during a Black Friday sale in order to find whatever vulnerabilities were left and fix them right away.

Result

The website became impressively fast. The last stress test showed that the website worked 30% better and faster. Our customer is now able to painlessly increase the resources of the database, add RAM, and add core power for periods with an extremely high number of users, such as for Black Friday or pre-Christmas sales. It also became possible to duplicate the database. In case one goes down, there is always another one to take over. Once the website is back to a normal selling period, our customer could decrease the resources and operate as usual.

will be interested