April 1, 2018
4 min read time

Announcing Varnish Cash: High performance for the Blockchain

cash

Blockchain fever has finally reached mainstream status with more than a thousand listed cryptocurrencies, and we feel that the world needs our contribution in this domain. This is why we are announcing the Varnish Cash solution.

Don't fret though, we are not launching yet another coin, instead we are creating a new set of tools to optimize blockchain usage, in terms of both security and performance in a way that is reusable and easy to integrate.

Not just Bitcoin

Of course, the poster child for the blockchain technology is Bitcoin, which is a cryptocurrency; however the blockchain can do much more than this, and that is what we are interested in here. Blockchain frameworks allow us to build decentralized, verifiable, robust records, and we believe they will be central in the future to storing information (not just money), a lot like HTTP does it today.

However, the current issue with mainstream projects is that they don't scale well; it is true that you can change the size of the blocks to buy yourself some breathing room, but it can't go on forever. This is why we are joining the party to provide a secure and blazingly fast caching layer for it.

The best part is that, as we are targeting the underlying technologies of Bitcoin, we can, right out of the gate, support Bitcoin and all its Altcoins since they are only trivial variations of it. Note that Ethereum support is currently in Beta and that Ripple is on the roadmap for Q3-2018.

Why so late?

It seems like the coin craze is fading, and we probably should have entered the game sooner; however, Varnish Software is committed to excellent code with robust implementations, especially in an area as sensitive as handling financial data, and this takes time.

There are two other reasons. The first one is that we needed a few extra bit to support this in vmod_crypto. If you remember it, we introduced Varnish Total Encryption to keep your cache safe some time ago, and it turns out a good deal of code is shared with the cryptocurrency world. But "a good deal" isn't "all" and we were missing a few things that are now in place with Varnish 6.

The final reason is more marketing than anything: last month we launched Varnish Solutions to better tailor our offer to different use cases. We needed that to be in place to introduce the Varnish Cash solution. So, nothing technical, really.

How does it work?

A technical post about the nitty-gritty details will soon follow, but it's always good to explain what you can expect from the solution and what the basis for it is. Simply put, the goal of Varnish Cash is to speed up transactions and to protect your wallet, and it does so using three broad angles.

Network efficiency and caching

The first idea is also the core of the "regular" Varnish: we have a killer network engine that allows us to handle thousands of transactions a second, making sure that the network doesn't take away precious resources from the actual mining.

The second one is also central to Varnish: the ability to cache (see what we did there? Varnish Cache/Varnish Cash, I came up with that!). If we already know the answer to a request from the network, we can just serve it again without having to mine for it again. And of course, that means we don't need to access your wallet when we serve from cache, meaning you can shield your wallet from both thieves and unnecessary spending.

Hashing

As you may know, mining relies on hashing, which is a mathematical operation that scrambles bit around with the goal of producing a unique identifier. It turns out that Varnish has been doing this for years, to store and retrieve content in its cache (called a hash table), so we thought: "Hey, can't we leverage that while mining?"

The answer is of course "yes"! You can couple Varnish Cache and Varnish Cash to accelerate mining. The way it works is easy, really: the blockchain asks of its node to hash content more or less randomly to produce hashes that have leading zeroes (more info here), so what Varnish Cache does is that it keeps a hash cache of all the hashing it did, and when one candidate is found, it sends it to Varnish Cash who doesn't need to mine for it. Preliminary tests (in an internal blockchain mimicking the Bitcoin one) show a five-fold improvement regarding mining, but of course it will depend on your HTTP traffic.

Encryption

Everything that goes through Varnish Cash is encrypted thanks to vmod_crypto. The primary benefit is that your data is safe, even if your server is compromised. But the real bonus here is that your wallet is finally portable. In the past we have seen people printing their wallet's content to store it only because no online storage is safe, including Youbit, Mt.Gox and a handful of others.

With this solution, you can simply copy your wallet everywhere, such as Google Drive, or Dropbox, you can even post it on Facebook, knowing that nobody can decrypt it but you.

The bright future

As the IT world adapts to the new world order, we are confident that more and more tools are going to help enterprises build better services, but ultimately, these tools will rely on the underlying blockchain (whichever is chosen) to be fast and scalable. This is why we are confident that by positioning Varnish Cash as a central part of the solution, it will have a bright future in that world.

Are you ready to learn more? Sign up for our Varnish Cash webinar.

Register for the webinar