High availability PostgreSQL for eCommerce

High traffic eCommerce site using PostgreSQL Streaming Replication.

Industry eCommerce
Technologies PostgreSQL
Datacenters 1
Products ClusterControl

Background

OxyShop, a privately owned company based in the Czech Republic, develops eCommerce solutions for a wide range of clients. Founded in 2001, OxyShop not only delivers a high-quality eCommerce web platform, but also provides business services like training, consulting, marketing, and support for customers who want to take their business online. The company provides both ready-made e-shop solutions as well as custom-made sites to meet the specific needs of demanding clients.

Challenge

Data management is a cornerstone of eCommerce site development. In addition to building eCommerce solutions, the OxyShop team is also responsible for ensuring uptime. “If one of our sites does not work, that means one of our customers cannot sell their product,” said Tomas Petru, Project Manager at OxyShop, “We have SLAs we have to meet and penalties for not achieving them.”

When a new client approached them to build a tailor-made eCommerce site, where high traffic was expected and tough SLAs needed to be in place, they knew they needed
a data management solution that would deliver stability, security, and (most importantly) high availability.

The OxyShop team had already decided on PostgreSQL as the database backend for the site. They planned to deploy a clustered PostgreSQL setup as they required an HA solution. The challenge was to find an easy way to deploy and manage a Postgres high availability environment. To ensure high levels of uptime, automatic failover was an important feature of the environment. The database had to self-heal. The alternative would have been to wait for an on-call ops person to be paged, that person would have to find a terminal to log in, and then start looking into log files to understand what had happened before they can initiate recovery and failover procedures. This would just take too long.

Solution

This was a large and important client for the company, and the project had a tight schedule. Having a high availability setup was a key requirement, and several options were considered – from building a management solution for the existing PostgreSQL setup to even more radical ones like migrating to a clustered MySQL setup. A Systems Architect who worked at OxyShop was familiar with Severalnines and ClusterControl and recommended the team look at it. “There were intensive discussions between our Developers, Architects, and both internal and external IT Specialists working on the project,” said Petru “Based on these discussions, we decided to first test ClusterControl to check whether it could be the right HA management solution for our Postgres database.”

So what would it take for OxyShop to utilize a ready-made, all-in-one database management system vs trying a manual approach and building the required functionality themselves? They established three primary requirements which had to be met to bring ClusterControl into their company and project…

  • Achieve high availability by leveraging Postgres’ native Streaming Replication feature
  • Software had to be a production-ready, reliable, and proven solution
  • The price of the software had to be a reasonable part of the overall project budget

Building an in-house HA solution for PostgreSQL would run into a number of challenges. Even though replication is now natively available in Postgres, it does not come with monitoring and failover. If the primary node fails, a secondary needs to be promoted as the new primary. The promotion needs to happen so that there are no data inconsistencies, for instance, when re-introducing the failed primary into the setup. The other main issue is to have one single database endpoint for the applications to connect to. Applications would typically only write to the primary node, so they need to be able to keep track of the primary node. Connecting directly to the primary node would not work well in case of failover, as the Postgres clients would keep retrying to connect to the failed primary node.

Outcome

In the end, the OxyShop team decided that it was neither cost-effective nor would it fit their aggressive project schedule to build a custom solution. ClusterControl, however, allowed them to manage a highly available Postgres setup. It would detect any primary node failures, promote a secondary node with the most recent data, and failover to it. Other secondary nodes would then be reslaved off the new primary node. The replication setup would be fronted by a redundant HAProxy load balancer with Virtual IP and Keepalived. Applications only needed to connect to the Virtual IP in order to access the database, any failover or topology changes would be transparent.

ClusterControl sets up a complete high availability stack, and failover functions great. We implemented it quickly and the entire experience was good.

Tomas Petru, Project Manager at OxyShop

This project had to be delivered by OxyShop in time for the busy holiday shopping season. It was the ability to implement quickly, coupled with confidence in the software that lead OxyShop to finally embrace ClusterControl as their High Availability solution for PostgreSQL.


Summary

confirmation-grey

Easy ongoing management with ClusterControl

The OxyShop team does not have DBAs on
staff to build or manage their clients’ databases, that duty falls to the team of SysAdmins. With ClusterControl’s easy-to-use, point-and-click interface their admins are able to handle all aspects of database management from

confirmation-grey

High availability expertise

Severalnines has a strong track record of
building and managing high availability for other open-source database vendors, including MySQL, MariaDB, and MongoDB. ClusterControl for PostgreSQL allowed OxyShop to deploy a battle-tested HA setup and manage it based on proven methodologies.

confirmation-grey

Automatic failover for peace of mind

With the automatic failover technology native to ClusterControl the OxyShop team was able to ensure that if a problem arose with one of their database nodes the system would automatically roll over to a functioning node; keeping the site running and allowing time for the support team to investigate the failed master.

Ready to automate your database?

Sign up now and you’ll be running your database in just minutes.

High availability PostgreSQL for eCommerce

High traffic eCommerce site using PostgreSQL Streaming Replication.

Industry eCommerce
Technologies PostgreSQL
Datacenters 1
Products ClusterControl

Background

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi magna nulla, blandit eu tortor ac, ultricies ornare diam. Suspendisse consequat vitae quam sit amet congue. Fusce vitae sapien quis leo lacinia sollicitudin non vitae nisi. Aliquam scelerisque orci id neque dignissim lobortis vulputate sit amet lorem.

Challenge

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi magna nulla, blandit eu tortor ac, ultricies ornare diam. Suspendisse consequat vitae quam sit amet congue. Fusce vitae sapien quis leo lacinia sollicitudin non vitae nisi. Aliquam scelerisque orci id neque dignissim lobortis vulputate sit amet lorem.

Solution

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi magna nulla, blandit eu tortor ac, ultricies ornare diam. Suspendisse consequat vitae quam sit amet congue. Fusce vitae sapien quis leo lacinia sollicitudin non vitae nisi. Aliquam scelerisque orci id neque dignissim lobortis vulputate sit amet lorem.

Outcome

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi magna nulla, blandit eu tortor ac, ultricies ornare diam. Suspendisse consequat vitae quam sit amet congue. Fusce vitae sapien quis leo lacinia sollicitudin non vitae nisi. Aliquam scelerisque orci id neque dignissim lobortis vulputate sit amet lorem.


Summary

confirmation-grey

Ut bibendum

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse vel nulla ac metus mattis pretium. Donec ultrices nibh velit, accumsan eleifend enim feugiat et. Aliquam tristique tortor vitae feugiat tincidunt. Sed tempus augue eros, vel feugiat lacus suscipit et. Donec eget posuere turpis

confirmation-grey

Mauris vel ornare metus

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse vel nulla ac metus mattis pretium. Donec ultrices nibh velit, accumsan eleifend enim feugiat et. Aliquam tristique tortor vitae feugiat tincidunt. Sed tempus augue eros, vel feugiat lacus suscipit et. Donec eget posuere turpis

confirmation-grey

Interdum et malesuada

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse vel nulla ac metus mattis pretium. Donec ultrices nibh velit, accumsan eleifend enim feugiat et. Aliquam tristique tortor vitae feugiat tincidunt. Sed tempus augue eros, vel feugiat lacus suscipit et. Donec eget posuere turpis

Ready to automate your database?

Sign up now and you’ll be running your database in just minutes.

Subscribe below to be notified of fresh posts