Walgreens turns to MariaDB as part of open source push

© Walgreens

US pharmacy giant Walgreens is looking to move all of its relational database needs to open source MariaDB as part of a broader shift towards the cloud and open source technologies.

The Walgreens Boots Alliance signed a major partnership with Microsoft in January this year, which in part included a commitment to move the majority of its IT infrastructure to the Azure cloud. The company actually began a cloud strategy in 2017, but that naturally changed somewhat after the big deal with Microsoft was inked.

Speaking at MariaDB's OpenWorks event in New York yesterday, Dave Tuegel, database manager at Walgreens, explained how the company is currently on a journey "from legacy on-prem databases to MariaDB and other open source databases running in the cloud".

That on-premise database footprint is currently primarily made up of costly Oracle technology, as well as some SQL Server, Teradata and IBM databases. It is now looking to run a mix of MariaDB for relational database, MongoDB and Microsoft Cosmos for NoSQL.

"To accelerate the journey to Azure cloud our demand is to move our entire data centre to the cloud within 18-24 months," Tuegel said. "We are looking to move applications as they sit on Oracle to the cloud, as well as converting them to MariaDB databases as a relational alternative to Oracle."

Walgreens started working with MariaDB officially in April 2018, complete with a dedicated architect to get started quickly. Tuegel admitted that as a primarily Oracle enterprise with roughly 2,000 IT team members, the move to MariaDB was a "major switch in paradigm" in terms of how it would deploy and rearchitect. All database administrators undertook a week of training as a result.

Why MariaDB?

Scalability and cost of deployment were highlighted as the primary drivers for change at Walgreens.

Read next: Confessions of an ex-Oracle customer: "The costs were phenomenal"

Tuegel wouldn't share figures on cost savings, possibly because they are so early in the process, but did tell Computerworld UK that the overall plan is to "be off Oracle eventually" - but with 25 years of legacy applications he admitted "it will take a number of years to get there".

To start with, Walgreens has been architecting its new applications to run on open source database technologies, while simultaneously planning to migrate existing applications to that new model over time.


In a more technical talk, Jasbir Sokhey, technical architect for digital engineering at Walgreens, went on to explain the chosen architecture and some very specific challenges Walgreens faced.

The architecture for the production environment, at the top level, comprises the MaxScale database proxy and one master database server with two slaves, spread across five Azure virtual machines (VMs).

An early issue the team confronted was regular dropped connections due to the default MariaDB 'keep alive' interval being longer than Azure's, so increasing that to match MaxScale ended up being a simple fix.

As a Fortune 50 company, naturally security was the biggest concern for Walgreens when they started shifting towards open source technologies like MariaDB.

"Our approach was to set up a stable environment using MaxScale, Galera and Master/Slave replication first and then configured and tested the security components," Sokhey said. Next they enforced LDAP authentication and implementing the secure sockets layer (SSL) for encryption.

Implementing LDAP was "fairly easy," according to Sokhey, and involved working closely with the security team to have authenticated users and using a pluggable authentication module (PAM) plugin to enforce authentication protocols.

For SSL, "MariaDB has a nice step-based approach to do that available online," Sokhey said. "Then work with your security team to generate public SSL keys."

Lastly, Walgreens is also looking to automate large chunks of its work in this area using technology from Chef.

"In the cloud especially, with open source technology, we want to automate the VM setups using Chef cookbooks," Sokhey said. "One of the biggest advantages, for creating a file system for instance, is the Chef server pushes that cookbook to all VMs and runs it for you, so don't have to call a VM Unix guy and ask them to do it for you."

Copyright © 2019 IDG Communications, Inc.

It’s time to break the ChatGPT habit
Shop Tech Products at Amazon