# Release The Kraken! An Open-Source PubSub Server for the Real-Time Web

> Kraken is a distributed pub/sub server we wrote to handle the performance and scalability demands of real-time web apps like Asana.

Source: https://asana.com/inside-asana/release-the-kraken

## Release the Kraken! An open-source pub/sub server for the real-time web

🐙Today, we are releasing Kraken, the distributed pub/sub server we wrote to handle the performance and scalability demands of real-time web apps like Asana.

## What problem does Kraken solve?

One of the key promises of real-time web applications is that users will see changes made by other users as they happen, without hitting reload or refresh. Many of the [up-and-coming reactive web frameworks](http://www.quora.com/Web-Application-Frameworks/What-are-the-differences-between-Meteor-and-Luna/answer/Geoff-Schmidt) initially accomplish this by periodically re-executing queries against the database. When we were building the early prototypes of Asana, our reactive framework ([Luna](http://www.asana.com/luna)) was no different.

Unfortunately, most production-ready databases, from Mongo to Mysql, are unable to keep up with the query volume that even a moderate userbase creates when you frequently poll the database for changes. We recognized this problem early, and worked around it by designing an algorithm that incrementally updates queries in real time without putting any additional load on the database server. Key to this solution is the requirement that every query be notified about changes to objects that could potentially match, or stop matching the result set of each query.

That’s where Kraken comes into play. Kraken is responsible for routing data-invalidation messages between the processes that are running these queries so that they stay up-to-date.

## Why is Kraken the right solution?

Before building Kraken, we searched for an existing open-source pub/sub solution that would satisfy our needs. At the time, we discovered that most solutions in this space were designed to solve a much wider set of problems than we had, and yet none were particularly well-suited to solve the specific requirements of real-time apps like Asana. Our team had experience writing routing-based infrastructure and [ultimately decided to build a custom service](http://www.quora.com/Asana/Why-did-Asana-implement-their-own-pubsub-system/answer/Kris-Rasmussen) that did exactly what we needed – and nothing more.

The decision to build Kraken paid off. For the last three years, Kraken has been fearlessly routing messages between our servers to keep your team in sync. During this time, it has yet to crash even once. We’re excited to finally release Kraken to the community!

You can get Kraken yourself at Github

- [Drei Tipps für eine effektive Nutzung der Asana-API](/de/inside-asana/klientboost-api)

Stellen im Fokus

Hinweis der Redaktion: Dieser Beitrag stammt von Richard Uruchurtu, Vice President of Operations bei KlientBoost.KlientBoost ist eine Online-Marketing-Agentur, die sich in erster ...

- [Deshalb arbeite ich bei Asana: Anna Vossschulte, Kundenbetreuerin](/de/inside-asana/why-i-joined-asana-anna-vossschulte-enterprise-account-executive)

Stellen im Fokus

Anna Vossschulte ist Enterprise Account Executive in unserem Büro in München. Sie schätzt die enge Zusammenarbeit mit den Kunden und hilft ihnen, ein effizienteres Team zu werden. ...

- [Why I joined Asana: Mark Arnoldy, Head of Customer Success](/de/inside-asana/why-i-joined-asana-mark-arnoldy-customer-success)

Stellen im Fokus

Welcome to our monthly series, “Why I joined Asana”! Every month, we talk with Asanas across our teams and offices—from Dublin to Sydney—to get to know the people inside the compa ...

- [Release the Kraken! An open-source pub/sub server for the real-time web](/de/inside-asana/release-the-kraken)

Stellen im Fokus

🐙Today, we are releasing Kraken, the distributed pub/sub server we wrote to handle the performance and scalability demands of real-time web apps like Asana.What problem does Krak ...

- [Stellen im Fokus](/inside-asana/role-spotlights)
