Using AlloyDB to power the next-generation e-commerce solution
Rolling out a single ecommerce solution to multiple brands in different European countries is a balancing act of orders, payments, deliveries, and inventory tracking. AlloyDB powers the next generation of ecommerce software built by our customer - a leading food and drugstore retailer in Austria - and Posedio.
7 min read - 04. Juli 2024
With the unparalleled growth of ecommerce, customers expect to be able to complete their ecommerce journey faster than it takes to pay at a brickand-mortar store. An industry-leading omnichannel approach means customers expect to order what they need and get what they ordered every time. These two goals put pressure on existing systems; it is necessary to respond quickly and know the stock levels and availabilities of the entire range of products to meet the high expectations of today’s customers.
The customer chose Google Cloud as the basis of its next generation ecommerce solution due to the stable and scalable services offered, the quick pace of innovation and the shared values around sustainability and environment protection.
Posedio is a cloud-transformation leader and IT-service provider based in Austria. With a strong focus on quality, Posedio is a reliable partner supporting companies on their journey to become digital natives. As a longterm partner of the customer, Posedio was chosen to design, implement and manage the adoption of AlloyDB in ecommerce.
AlloyDB is a Postgres-compatible database offering by GCP. It combines years of experience in running databases with advanced AI into a unique database engine that can execute both transactional and analytical queries at scale. The ability to provision databases on-demand, the strong focus on security and the very nature of a managed service led to improvements in developer experience that were directly reflected in developer productivity.
The early stage of the ecommerce product made use of a centrally managed CloudSQL for Postgres instance. The team quickly realized that this approach, while a good overall solution, could not meet the needs of a quickly evolving ecommerce product.
As the number of teams working on the ecommerce platform grew, the coordination effort around provisioning, accessing, and evolving the database became a clear bottleneck. What’s worse, the stress on the database began to influence other products that used the shared instance. It was clear that a dedicated database maintenance team would be needed with this approach, negating the benefits of a managed service.
Having a single Postgres database forced the team to decide between optimizing for performance of transactional or analytical workloads. A strong focus on customer experience favored the transactional approach. However, the analytical queries would take long and impact the availability and accuracy of key data-driven decisions along the customer journey.
As a first step, Posedio set up three AlloyDB clusters, using Terraform as an Infrastructure as Code provider. The clusters were then connected to the existing infrastructure and networking, so they are accessible to all services and developers. An automated backup schedule was configured for the production database, with point-in-time recovery considered as the next step.
To improve developer experience, Posedio made sure the database is accessible from anywhere in the network. This meant that the commitment to security and a zero-trust architecture was paramount. Posedio managed the rollout of the authentication proxy, relying on the identity of the applications to control access to the database. Utilizing Workload Identity for applications running on GKE, user identity for developers and Google Cloud IAM for permissions, all access to the database is restricted, encrypted and audited to meet the highest standards expected by the customer.
“With AlloyDB and Posedio, we were able to onboard over 20 services, improving the productivity of more than 40 developers and providing a better, faster and more satisfying experience to our customers in Central and Eastern Europe.” – Markus Mayr-Lechner (Cluster Lead eCommerce)
“We considered AlloyDB as a potential solution soon after Google Cloud announced its general availability (GA). Having worked with the customer International on projects involving Google Spanner and Google Cloud SQL we felt confident we can deliver an optimal solution. We followed our engineering methodology and outlined a plan. And then we got to work!” – Hannes Bösch, CEO of Posedio, Architect of the Ecommerce Platform
“There were two major problems we faced. The first one comes from the nature of big projects – getting multiple teams to work together effectively. The second is at the root of all retail operations; we need to support two fundamentally different workflows. We need to quickly respond to transactions while running intensive analytical queries to get more insights into the inventory and customer preferences. AlloyDB is the solution to both of those problems!” – Günter Schwabe (CPO eCommerce Platform)
“We were already working with Postgres on Google Cloud SQL to implement transactional workflows. Once Google launched AlloyDB we quickly noticed it bridges the gap between transactional and analytics behavior in ecommerce processes.” – Markus Mayr-Lechner (Cluster Lead eCommerce)
Results
Once the rollout was complete, the teams experienced the benefits quickly. The time to provision a new database dropped significantly and teams were able to build new services much more quickly, no longer requiring support from external teams.
The latency on analytical queries went down by several orders of magnitude, allowing developers to run more complex queries and get better results when predicting inventory levels and delivery capacity. The AlloyDB query analyzer enabled developers to independently optimize their queries and further increase performance – a key driver for developer productivity.
Transactional operations saw quicker response times as well. Queries that used to run around 100ms with outliers reaching 600ms would now consistently run between 25 and 50ms with very few outliers reaching 100ms.
Sustainability is a shared goal between the customer, Posedio and Google Cloud, reflected in the decision to run AlloyDB clusters in low-carbon regions. This minimizes the impact on the environment as the ecommerce project moves closer to a greener future.
After the successful rollout of AlloyDB to the ecommerce product, the customer is considering offering AlloyDB as the standard cloud-hosted database to all teams and products within the company. Integration into the self-service application platform, co-developed by Posedio, is currently under evaluation.
Solution
To tackle these challenges, Posedio proposed a solution focusing on utilizing AlloyDB as the core database technology for the next generation ecommerce platform at the customer. Posedio prepared a design document outlining the benefits of AlloyDB and contrasting it against the existing solution. The proposal contained all necessary information on the network setup, security, and application migration paths.
Challenge
Increase customer satisfaction by reducing latency
Improve inventory analytics queries
Accelerate development speed of independent teams