redirect.pizza Devours Massive Amounts of Data to Deliver Fresh Domain Redirects + Piping Hot Analytics with SingleStore

“The support we got from SingleStore went above and beyond, and we said to ourselves: ‘Great product, great support, let’s implement right away’.” Michel Bardelmeijer, Founder, redirect.pizza

Founded by Michel Bardelmeijer and Ron Kesting, redirect.pizza is an innovative, hassle-free domain redirect service that evolved from an internal tool the two created at Enflow, a company based in The Netherlands that combines online expertise with its clients’ powerful ideas to build digital realizations. Bardelmeijer and Kesting knew they had something special in this new service that they wanted to make public, and give back to the community through a free forever plan, while having some fun with it in the process. That was also in keeping with their informal company culture.

“Domain redirects were way too hard for something that should be very easy to set up. We want to make that easy again and offer a service that’s free to use for 90% of our client base,” said Bardelmeijer.

Michel Bardelmeijer, Partner, redirect.pizza

Challenges/Goals 

“We know DNS changes are something a lot of people struggle with. It can be pretty easy to set up, but making the changes correctly can sometimes be hard,” said Bardelmeijer. “We have a free plan and want to keep it forever. Ninety percent of our users fit this plan because they only have one or two domains to redirect, and the paid plans don’t come into play until more than five source hostnames.”

redirect.pizza’s main goal is to offer an easy way to redirect without any of the complexity that comes with setting up HTTPS certifications. Why the name? The team wants to make redirecting as easy as ordering pizza delivery. Since it’s an Enflow side project, they like to have fun with it, which explains the (tasty) pizza branding. And it’s very easy to remember!



“We wanted to provide a raw analytics export option, which would require a lot of compute and add a lot of expense with MySQL. We didn’t have a lot of confidence in the setup.”

Michel Bardelmeijer, Partner, redirect.pizza



The main use case for SingleStore at redirect.pizza is on the analytics side, as well as providing a raw data view and CSV export for clients. The team was experiencing slowdowns on analytics pages, which prevented them from quickly adding new metrics users wanted. They also foresee massive growth potential in the service, on the order of 100X, but the existing solution they were trying to scale at Enflow held them back.

“If we wanted to grow with the old solution on MySQL, we needed to rethink our analytics ingest per metric that we wanted to create. It would add a lot of overhead to expand those capabilities. For instance, we wanted to provide a raw analytics export option, which would require a lot of compute and add a lot of expense with MySQL,” said Bardelmeijer. “We didn’t have a lot of confidence in the setup.”

Technology Requirements 

The original focus of redirect.pizza was to track web hits, which collect details such as the full URL, country, and referring URL. When a redirect request came in, it would track each hit individually, save it to a Redis store and process it with a Laravel job to insert in MySQL. This data was being saved in the same MySQL database that housed the application, with background queues to process the information.

After tens of millions of hits, the ingest process experienced a massive slowdown and couldn’t keep up. Initially the team tried to optimize its MySQL setup, but that added a lot of complexity. The application became less and less responsive in presenting analytic results. 

“We were constantly faced with the reality that our existing data store was a bottleneck,” said Bardelmeijer. He and Kesting started exploring other options in hopes of alleviating these issues. Their technology requirements for another solution for redirect.pizza included: 

  • SQL and MySQL compatibility: The team knew SQL very well and wanted to keep using MySQL connections and setting up queries with that method
  • A real-time solution surrounded by a great community 
  • Clear, concise documentation readily available online

Why SingleStore

redirect.pizza explored ClickHouse, Amazon Redshift, Google Big Data, and Elasticsearch. “We tried a proof of concept for each one,” explained Bardelmeijer. “Each of them could work, but none of them felt right for our use case. We had to refactor too much of our code base and add new complexities to support them.”

The redirect.pizza team had seen Reddit ads featuring SingleStore, but thought it was a MySQL rebrand. That’s when Bardelmeijer encountered what is rapidly becoming a famous blog post series on implementing SingleStore by Jack Ellis, Co-Founder, Fathom Analytics.

[You can find all three posts in that series linked at the bottom of this SingleStore impact story: Why Fathom Analytics Ditched MySQL, Redis, and DynamoDB to Power the World's Fastest Website Analytics Platform. Before you head off to enjoy the pure genius of Jack, we hope you’ll find the impact story worth a read.]

“I found out about SingleStore through Jack Ellis on Twitter and learned we had the option to try it ourselves in a box on a development machine. We went ahead and tested it and the results were really great,” said Bardelmeijer.

SingleStore is the modern database for data-intensive applications, unifying transactions, analytics, storage, and data models. It enables organizations to drive ultra-fast analytics and effortlessly build and scale modern apps with just one database.

As redirect.pizza explored SingleStore’s capabilities, it reached out to the SingleStore team for support on data integration best practices and managed versus self-hosted solutions, and that further cemented the decision to choose SingleStore.



“I found out about SingleStore through Jack Ellis and learned we had the option to try it ourselves in a box on a development machine. We tried it and the results were really great. SingleStore support made themselves available to help with debugging, even though that was just the integration piece and not part of SingleStore itself. That really helped us implement it successfully.”

Michel Bardelmeijer, Partner, redirect.pizza



“The support we got from SingleStore went above and beyond,” said Bardelmeijer, “and we said to ourselves: ‘Great product, great support, let’s implement right away’.” He recalled how members of SingleStore Support and other teams assisted the redirect.pizza team with optimizing the ingest flow and even provided code snippets for it to use. “SingleStore Support also made themselves available to help with debugging, even though that was just the integration piece and not part of SingleStore itself. That really helped us implement it successfully.”

Other SingleStore capabilities that redirect.pizza found particularly compelling included: 

  • SQL syntax compatibility for row store and column store. They could communicate with both row and column stores using the same SQL syntax they were already familiar with. 
  • Self-managed and managed options. SingleStore is available on-premises and in the cloud, giving redirect.pizza the flexibility to select the deployment option that best fit their startup phase.

Solution 

redirect.pizza opted for SingleStore Self-Managed. The team uses the Europe-based hosting infrastructure provider Cyberfusion Core to host and manage its SingleStore cluster. To keep application latency low, the team uses private networking to store the SingleStore data in the same environment as the app. Cyberfusion Core set up a proxy that forwards Data API calls from the edge nodes to the SingleStore cluster.

The team uses Laravel for managing redirects and API connectivity in redirect.pizza. The edge network runs as a completely separate (stateless) network, with a shared redirect configuration stored in JSON. The edge redirect network works on a custom golang binary that handles the redirect traffic. All edge nodes are designed to be fully resilient and stateless, and will un-announce themselves from border gateway protocol (BGP) if an error occurs.

To deliver analytics in a raw data view with CSV export, redirect.pizza uses a single table with a team filter enabled via SQL to export it quickly by utilizing the quick `INTO S3` export option provided in SingleStore.

“We were talking about this use case with the SingleStore team, and they said it would be better to use batch inserts that maxed out at 5,000 hits per time. They wrote a script for us so we could insert the hits, or after five seconds, insert what was in the queue,” said Bardelmeijer. “We had a bit of trouble writing a script that was anatomically correct, but SingleStore helped out and provided the code for that. That was really awesome.”

Today, 17 edge servers redirect to SingleStore, which uses the Data API to ingest data from these servers. All request info is aggregated together into a single SingleStore cluster.

redirect.pizza manages its own IP space, so its customers never have to worry about the IP address changing. “We’ve recently purchased our own IP space to be in full control. We announced this space via BGP, so we can have a single IP that’s automatically routed to the nearest location. We prefer to keep everything as non-vendor locked-in as possible, which was another big reason to choose SingleStore,” said Bardelmeijer.



“We were talking about this use case with the SingleStore team, and they said it would be better to use batch inserts that maxed out at 5,000 hits per time. They provided a code snippet for us so we could insert the hits when that 5,000 hits limit of a five-second timeout was reached, to insert what was in the queue.

We had a bit of trouble writing logic that felt anatomically correct, but SingleStore helped out by providing even code snippets, something you don’t expect from a support department! That was really awesome.”

Michel Bardelmeijer, Partner, redirect.pizza



Outcomes 

redirect.pizza is achieving technological breakthroughs and firing up its processes for massive business growth with SingleStore:

Achieving Ultra-fast Data Ingest of 750 Million Rows per Month

redirect.pizza is now ingesting 750 million rows per month. The team currently cleans up this data after 90 days (365 days for Enterprise customers), but SingleStore supports longer data retention periods and they plan to take advantage of this capability for all plans.

Achieving New Analytics Breakthroughs via Improved Performance and Dashboard Acceleration

redirect.pizza’s customers are experiencing much faster loading of analytics and now have the ability to export their raw data. With their dashboards now meeting redirect.pizza’s performance expectations, Bardelmeijer, Kesting, and the team are now able to turn their attention to creating new metrics from the data they have, such as using time series data. They are also working on a denormalized data project for Enflow, a project that currently uses MariaDB but looks like a good fit for SingleStore.



“We prefer to keep everything as non-vendor-locked-in as possible, which was another big reason to choose SingleStore.”

Michel Bardelmeijer, Partner, redirect.pizza



Supporting 100s of Users Now — and Poised for 100X Growth

User concurrency on redirect.pizza is currently in the hundreds, but with SingleStore it now has all the data platform power it needs to support its future growth projections.

Flexible and Cost-Effective Deployment Options to Meet Current and Future Business Needs

Every other solution the team considered was either:

  • Unable to provide hosting in Europe
  • Too expensive
  • Too hard to implement
  • A combination of all three

SingleStore offering the cost-effective flexibility of SingleStore Self-Managed and SingleStore Helios allowed redirect.pizza to make the best choice for its current startup phase while positioning it for the future.


SingleStore is helping companies compete and win across every vertical. Learn more →