publica.la

publica.la Speeds Search 70X, Processes Millions of Rows per Second, Lowers TCO, and Grows its Business with SingleStore on AWS

Faster search results
70X

Queries per minute for real-time performance
120K

Publica.la is now processing millions of rows per second
Millions/:01

Saving $1,000+/mo. DB cost + massive opportunity cost
USD1K

Dashboard acceleration
35%

publica.la is the Shopify for digital content. It enables authors and content creators to have their own custom storefront to share and sell eBooks, audiobooks, and other digital content direct to consumer (D2C). Booksellers, publishers, media companies, influencers, and many others can reach readers worldwide, increase their incomes, and create sales strategies based on content and user metrics. Authors and content creators can remain focused on creating or selling great content and their audiences can enjoy that content from any device at any time. publica.la’s interactive reader lets them highlight text, take notes, transform text into audio, translate into any language, and more.

publica.la’s goal is to be the default D2C solution for publishers in LATAM and EMEA, and it has already amassed some impressive business metrics:

  • 1+ million active users consuming more than 2.5 million titles 
  • 1,200+ stores
  • 250+ customers including Narcea, EUNSA, eBooks Patagonia, libreka! Distribution, alphaeditorial, Grupo Planeta, Penguin Random House, Lejister.com, and Mandioca
  • Serves 23 countries, and that figure is growing
  • High-profile investors include Stripe, ChileVentures, FenVentures, Berkeley SkyDeck, Lighter Capital, and Start-Up Chile

challenges-goals

challenges-goalsChallenges/Goals 

publica.la intends to democratize and decentralize content commerce, providing a one-stop solution for publishers and authors to connect with their audiences, but major challenges stood in its way. publica.la customers were not getting the quality and speed of search results they needed, even though the company was putting a great deal of effort into this functionality. “Our original database solution was not scaling, it was failing. In some cases, we couldn’t provide search results, and the quality of the results was not very good,” said Franco Gilio, Co-Founder and CTO, publica.la.

Inability to scale its search capabilities was the primary reason publica.la started looking for a new database solution, but its infrastructure complexity also posed an issue. “We had difficulty managing all the different tools and software we were using; MySQL, PostgreSQL, and Redis. We were going to add Elasticsearch to solve the search issue, but it wasn’t optimal,“ said Gilio.

technology-requirements

technology-requirementsTechnology Requirements 

publica.la needed to be able to scale search, as it was experiencing growth by thousands of publications per month. Some new customers have up to 100,000 titles to add to their content library, representing millions of pages. Gilio and the team tried to use indexes in Managed PostgreSQL, as MySQL did not support full-text search at the time, but it still did not scale as well as they wanted.

“It was a solution we knew would last about two years, then we would need to migrate to a more mature solution,” said Gilio. “If we only cared about search, Elasticsearch may have been the right solution. But the key for us is to be able to manage all of our data infrastructure in one data platform, which was not something Elasticsearch would facilitate.”

Franco Gilio, Co-Founder and CTO, publica.la

Publica.la also wanted to reduce infrastructure complexity so it could move faster and with more confidence. The original solution was creating friction and lost time inside the engineering team, and this needed to be addressed.

why-single-store

why-single-storeWhy SingleStore

publica.la’s original data environment was a textbook example of database sprawl. It included: 

  • AWS RDS with MySQL 8
  • Three different RDS databases 
  • PostgreSQL 14
  • Redis

Adding Elasticsearch to the mix would further increase the complexity of the infrastructure. Other search solutions under consideration included Algolia, which the team thought was fantastic, but too expensive; or having Elastic.co host the cluster. AWS’s version of Elasticsearch, Amazon OpenSearch Service, as well as Amazon Aurora and Aurora Serverless, also came up in discussions — but that was also when publica.la learned about SingleStore. 

“Some of our most important revenue-generating customers started to grow faster than we were able to manage with PostgreSQL," said Gilio. "We spoke a lot with Jack Ellis of Fathom Analytics, who is very outspoken about what he does and doesn’t like in databases. "He basically said, 'You should just try SingleStore'." SingleStore is the modern database for data-intensive applications, unifying transactions, analytics, storage, and data models. This solution enables organizations to drive ultra-fast analytics and effortlessly build and scale modern apps with just one database.

“Originally, our aim was just to scale full-text search. But when we learned that SingleStore was an option to solve that issue, we also saw that we would be able to manage costs in a more predictable way. SingleStore has seriously decreased our infrastructure complexity, allowing us to move faster and with more confidence. This all started with search, but now it's far bigger than that,” said Gilio.

solution

solutionSolution 

“With SingleStore, we are able to put everything in one single cluster,” said Gilio. “We can take advantage of that cluster's performance for all the other databases we run, which is something that we couldn’t do with Elasticsearch. We were just putting that money in Elasticsearch and only impacting search. But by implementing SingleStore, we get to impact basically everything, including search.”

Replaced MySQL, PostgreSQL, Redis, and Elasticsearch with SingleStore, Reducing Complexity and Gaining a 16X Speed Increase

publica.la used SingleStore to replace MySQL, PostgreSQL, Redis, and Elasticsearch, implementing SingleStore Helios in a SingleStore S1 cluster hosted on Amazon Web Services (AWS). In addition to handling full-text searches, SingleStore also supports transactions, enabling publica.la to implement full translytical/HTAP functionality in a single database.

publica.la started with a small proof of concept using the staging database, which was a MySQL database in AWS. In the original database, it had complex indexes to speed up queries to acceptable levels. When the team tested the staging database with SingleStore, it didn’t use any custom indexes — but the speed was either significantly faster or instantaneous. 

“We just couldn’t believe it. It looked like an illusion, but it was real. With SingleStore, it's just one single cluster. That single cluster is more than powerful enough to run all those databases much faster than before,“said Gilio.

The typical publica.la query has zero to two joins, but some dashboard and reporting queries have 10-15 subqueries. The team has tested more complex queries, he added, "and we've seen great results!"

“With MySQL, Google Data Studio was so slow it was almost unusable,” Gilio added. "We've now migrated the dashboards to use SingleStore and are seeing an average of a 16X speed increase."

Migrated from MySQL to SingleStore using Arcion Cloud with Zero Downtime

“We could have taken down the platform for about six hours while we migrated everything and run lots of checks to validate that the migration was successful. We could have spent months refactoring our app so it could work with both databases at the same time. We also could have hired an expensive professional services firm to help us,” said Gilio. “Instead, we discovered Arcion Cloud.”

arcion-cloud-is-a-managed-service-that-sits-on

Arcion Cloud is a managed service that sits on Arcion’s self-hosted product, providing a user-friendly GUI to set up, run, and monitor migrations. In addition to its other capabilities, Arcion Cloud enables Full Replication, which first takes a snapshot and then switches to change data capture (CDC) mode, effectively keeping the source and destination in sync and with sub-second latency. “Arcion ensured that our MySQL and SingleStore databases were always current to within a second of each other throughout the migration,” explained Gilio. “Arcion Cloud transferred 4,500 rows/second on average, which made it a seamless process for us! In the end, we estimate Arcion helped us save at least four weeks of engineering effort.”

outcomes

outcomesOutcomes 

Choosing SingleStore has delivered significant advantages to publica.la and its customers:

70X Faster Search Results + 35% Dashboard Acceleration

“We wanted to benchmark search and the analytics database because we thought those were going to be the ones that are going to see the most impact. We took special care to compare SingleStore against a similarly priced instance in AWS, just to make it a little bit fairer,” said Gilio.

SingleStore was so fast publica.la didn’t even need to run its usual benchmarks. Search benchmarks were up to 70X faster than the previous solution, and the dashboards were 35% faster. These performance improvements led to a faster and better experience for users across all areas:

  • Search
  • Storefronts
  • Dashboards
  • Exports
  • Other functions

“Having everything in one place with SingleStore enables our customers and their users to get better answers faster,” said Gilio.

The system supports 500+ concurrent users, and as publica.la’s business grows, with SingleStore it will be able to support tens of thousands of concurrent users and beyond. "We can now query the DB in more creative ways without fear of slowing down the app," he added.

Real-Time Performance Processing Enables 120K Queries Per Minute

“About 98% of what we do with the database is real-time, so low latency is extremely important for us,” explained Gilio. By deploying SingleStore, publica.la is delivering real-time performance on nearly all queries, processing millions of rows and 2,000+ queries per second.

saving-1-000-month-in-db-cost-opportunity-cost-incalculable

Saving $1,000/Month in DB Cost; Opportunity Cost: Incalculable 

Depending on customer and user activity, publica.la was experiencing major cost spikes due to associated services, such as the AWS Network Address Translation (NAT) gateway. By migrating to SingleStore, publica.la was able to gain better cost predictability. Previously, using MySQL, it had to push data to Amazon S3 daily to support cost-effective operations. With SingleStore, publica.la has now eliminated this process, thus minimizing data movement.

these-performance-improvements-and-cost-predictability-are-saving-publica-la-at-least-1-000-per-month-and-those-savings-will-almost-certainly-increase-as-its-customer-base-grows-on-top-of-that-the-opportunity-cost-in-terms-of-time-saved-due-to-not-dealing-with-database-sprawl-complex-query-workarounds-and-other-complications-is-almost-incalculable

These performance improvements and cost predictability are saving publica.la at least $1,000 per month, and those savings will almost certainly increase as its customer base grows. On top of that, the opportunity cost in terms of time saved due to not dealing with database sprawl, complex query workarounds, and other complications is almost incalculable. 

“We usually worry about data and cost spikes, but now we’re in a much better place with SingleStore. We can focus on onboarding customers without worrying about the impact,” said Gilio. 

Responsive Support and Quality Documentation

“My expectations were high and SingleStore has exceeded them. The solution is very mature and it shows," said Gilio. "The documentation is very good and perfectly clear. The experience with everyone has been very good, supportive, and responsive to our big and small issues. When SingleStore promises to ship a fix, they deliver, and that’s amazing.”

publica.la is excited to be exploring several other SingleStore features including: 

  • Workspaces to isolate workloads, as it currently runs production and staging on the same SingleStore cluster 
  • Unlimited Storage to auto-scale storage so it can phase out the MySQL database and its cumbersome daily processes

look-for-franco-gilio-and-publica-la-in-these-webinars

Look for Franco Gilio and publica.la in these webinars:

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