Introduction

RPC calls at unprecedented scale and speed

What is Lantern?

Lantern provides edge-caching for the Solana account state. It's like having a zero-latency RPC right next to your application.

It works by streaming in updates only to the data you need. You can query it with standard RPC calls. This gives you a drop-in upgrade for your RPC service. Since it works off a local cache, it's alarmingly fast and can save you a lot of bandwidth and expense, especially if you are making a lot of similar RPC calls.

Lantern can be configured to store only the programs you are interested in. It will keep only the accounts belonging to these programs up to date by streaming in data from our RPC service. This way it keeps storage usage very reasonable.

Who is Lantern for?

Lantern is for everyone that makes frequent and heavy RPC calls, or just needs the fastest access possible.

Typical response time for getAccountInfo and getMultipleAccounts are between 0.1 and 0.25 milliseconds. There's no inherent rate-limiting, it's possible to serve more than 10,000 requests per second.

Since you already have the data locally, these requests don't incur the costs normally associated with RPC calls. This means that applications that make a high volume of RPC calls can expect substantial savings with Lantern.

What does Lantern Cost to Use?

Lantern uses Flux RPC as a source of data. Flux RPC charges 6$ per 100GB of bandwidth used. Lantern uses this data in two ways:

  1. To download programs at startup

  2. To keep programs up-to-date during runtime

Caching large and busy programs like PumpFun is much more expensive than caching small programs that have infrequent changes.

Cost Example

We set Lantern to cache all major DEXs as well as Pumpfun and Moonshot locally (this configuration). It used about 230 GB of bandwidth monthly, and about 35 GB on startup. This aggressive configuration is still well within the limits of the 49$ Developer plan at Flux RPC.

For a small application making 10 requests per second, this is already a savings of hundreds of dollars per month.

As you grow, the cost of using Lantern does not. When you need hundreds of requests per second, we'll save you thousands of dollars per month.

In our test rig (a Macbook M3 Pro), we could serve over 10k RPC requests per second. Compared to paying for those requests at a competing RPC, that laptop paid for itself in a day.

Last updated