Lantern - Benchmarking
Learn how to benchmark Lantern performance with the open-source RPC testing suite and compare local-cache throughput.
Benchmarking Tool
We provide an open-source benchmarking tool to test Lantern's performance. The repository includes a full readme with detailed instructions.
Quick Start
To run a quick test, clone the repository and follow these steps:
1. Build the Tool
Shell
go build -o rpc_test
2. Execute the Tests
Replace <your-API-key> with your FluxRPC API key:
Shell
./rpc_test runall --api-key <your-API-key> --url http://localhost:8080
Requirements
To run the benchmarking tests, you will need:
- Golang environment installed
- Lantern running locally with a valid API key
- The "benchmark" preset configuration file
This test assumes you are using the "benchmark" preset configuration file. A new account on FluxRPC receives 10GB of free bandwidth, which is sufficient for this test. Just create an API key and pass it to Lantern.
Expected Results
The results should be very fast . If you're seeing values in the tens of milliseconds, that generally means you're making a request that Lantern cannot fully serve from local cache.
Make sure you're using the 'benchmark' configuration pre-set, that Lantern has a valid API key, and that it has started up fully before running the tests.
Typical Performance
- getAccountInfo : 0.1-0.25 milliseconds
- getMultipleAccounts : 0.1-0.25 milliseconds
- Throughput : 10,000+ requests per second
Advanced Usage
The benchmarking tool has many more powerful options when used from the command line. Run it with the -h or --help flags for more information.
Custom benchmarks against very large programs will take longer to finish due to the large gPA requests. gAI and gMA still completed very quickly regardless of the program size.
Open the section overview for the broader context, live navigation, and interactive code examples.
Continue in this section
- Lantern - FAQ — Frequently asked questions about Lantern installation, usage, performance, cost, and troubleshooting.
- Lantern - Known Issues — Known issues and platform-specific considerations when running Lantern on Windows, macOS, and Linux.
- Lantern - Edge-Caching for Solana — Lantern provides edge-caching for Solana account state with zero-latency RPC access and selective local synchronization.
- Lantern - Supported RPC Methods — Learn which Solana RPC methods Lantern can serve from local cache for ultra-fast responses and lower upstream load.
- Lantern - Getting Started — Get started with Lantern in three simple steps: create an account, install Lantern, and configure it for your RPC workload.
- Lantern - Installation Overview — System requirements and installation methods for Lantern, including Docker and command-line deployment paths.