Helthjem Keeps Deliveries Running with Aiven

Aiven for PostgreSQL provides Helthjem with scalability, performance and peace of mind

One of the biggest distribution and delivery services in Norway, Helthjem has seen its delivery operations and its demand for data processing increase rapidly since it was founded in 2015. Always a strong proponent of PostgreSQL®, the company has moved from in-house management to Aiven for PostgreSQL on AWS. With the databases now running with superior levels of stability, scalability and performance, Helthjem’s small engineering team can focus on developing solutions for improving customer service, leveraging the potential of AI and supporting the company’s ongoing expansion.

Making life easier for Norway’s residents — one parcel at a time

Helthjem is part of media giant Schibsted Norway. Helthjem collects and delivers more than 13 million packages across Norway. In just a few years, the company has become one of Norway’s largest privately owned companies in the distribution of online shopping packages. Today Helthjem has a market share of approximately 15% but still has its sights set on significant expansion to deliver more parcels to people’s home, faster than ever.

Record-breaking volumes — for deliveries and data

“Helthjem may be dedicated to distributing physical goods, but technology is at heart of what we do,” says Dave Li, Senior Software Engineer at Helthjem. The company supports e-commerce in the country, delivering parcels from businesses to consumers, and enables consumer-to-consumer deliveries through its partner website. “It’s highly data intensive,” says Li. “And if our capability to process that data goes down, the whole business comes to a halt. We simply cannot afford any downtime.”

Initially supported by the IT team at parent company Schibsted, Helthjem formed its own small, tight-knit engineering team, including seven software developers, two years ago. The new in-house team took on responsibility for almost every aspect of the technology infrastructure and software to ensure the smooth collection, sorting and delivery of parcels.

Like many delivery firms, Helthjem saw demand for its services increase dramatically during the Covid pandemic. But even as Covid-driven demand for delivery services declined, Helthjem continued to grow, breaking its own records for annual deliveries and outgrowing the wider e-commerce market on the way.

But just as volumes were increasing and the business was growing, so was the burden on the in-house team. “Our PostgreSQL databases underpin everything we do — orders, tracking, fulfillment. PostgreSQL has a well-deserved reputation for reliability, stability and performance but its management was taking up too much time for our small team. We needed a partner to help us.”

Migrating to Aiven for PostgreSQL — “it just works”

Helthjem considered a number of vendors, eventually choosing Aiven for PostgreSQL running on AWS. “We wanted to run PostgreSQL on AWS because our parent company, Schibsted, is a big user of AWS. This allowed us to benefit from some economies of scale,” says Li. “Additionally, Aiven came highly recommended by some Schibsted colleagues who use Aiven for Apache Kafka®.”

Another deciding factor for choosing Aiven is that it enables Virtual Private Cloud (VPC) peering on AWS which in turn gives Helthjem added security. This is a way of connecting separate private networks with each other, making it possible for virtual machines in different networks to talk to each other without going through the public internet, for greater security.

Li was also impressed with the extensions that come out of the box with Aiven for PostgreSQL. “For example, we couldn’t get TimescaleDB, an open-source, PostgreSQL-based relational database for time-series data from Amazon. Aiven could simply provide it out of the box.”

The migration to Aiven for PostgreSQL proved to be extremely easy, and the relationship has been a positive one ever since. Li says: “Our journey with Aiven has been completely pain-free. We've had no issues whatsoever at any point during the whole transaction. We clicked the button, the service was up, we converted things, we scaled up read models and it just worked.”

Consuming a million events a day in busy holiday periods

Stability and scalability are key to Li and his team. Helthjem has to manage wide variations in delivery volumes — and in data processing requirements — throughout the year. These can reach extreme spikes during events like Black Friday or in the run up to Christmas. In 2023, Helthjem broke its existing records for delivery volumes during Black Week and achieved the highest weekly volume in its history.

“All the systems we currently run are event-driven. In busy holiday periods, like Black Friday, we consume about a million events a day — and that depends on Aiven for PostgreSQL,” says Li. “We have an event store that receives all of the things that happen in the form of the event. That is put together in a stream and from there we create a projection database which creates the latest state of the query. The ‘hot’ event store which holds current data that is being used and processed is about 275 gigabytes of data. Projections — all of the state since we started two years ago — is about 355 gigabytes of data. For example, our events table has over 350 million records. So our databases are not small, but with Aiven they just work.”

The performance of the system of course impacts on customer service levels. In addition to the parcels being collected and delivered successfully, customers want to monitor the status of their parcels. “The system that enables customers to track their packages runs on Aiven for PostgreSQL. It has been working like a charm for two years now,” says Li.

Helthjem recently opened a new distribution center in Vestby, just outside Oslo. The new facility, which covers more than 30,000 square meters, is able to handle at least 40 million parcels a year. “The new distribution center integrates with our existing systems and now underpins the operations of the whole business — orders, tracking and fulfillment,” says Li. “It is running flawlessly on Aiven for PostgreSQL and we are confident the databases will scale seamlessly as we expand to four times our current output."

Next steps, new features — and emerging role for AI

Li has been impressed with Aiven’s collaborative approach, which he thinks sets it apart from its competitors. “We suggest new features or fixes for Aiven to take into consideration, and quite often it makes them available,” he says. “Aiven makes life easier for us. There’s a clear mentality of ‘let's help the customer’ regardless of how much money you are paying.”

As to what comes next, Helthjem is looking into the role that AI could play in its business, and the PG Vector extension for PostgreSQL provided by Aiven looks promising. Li says: “We have a proprietary model for predicting delivery dates, and we're looking into converting that model into an echo database using PostgreSQL and PG Vector. That would allow us to run the model more dynamically and that gives us plenty of advantages.”

In addition, Li and his team are exploring Aiven for Clickhouse® as a back end for Plausible Analytics, an Elixir/Phoenix application. “That would make sure our analytics were fully compliant with GDPR,” says Li. “Right now, it looks like another service from Aiven that provides exactly what we need.”

Get your first cluster online now

Aiven makes setting up cloud databases so simple anyone can do it. Our set-it-and-forget-it solutions take the pain out of cloud data infrastructure.