Summary
ZKsync uptime refers to the availability of the ZKsync network and its RPC endpoints. While the network's official status page tracks sequencer and API health, your dApp's reliability also depends on your RPC provider's redundancy and failover strategy. This article explains what to monitor, how to evaluate providers, and how to build resilience into your stack.
Quick Recommendation: What to Check Before You Rely on ZKsync
Before you build on ZKsync, decide what uptime means for your use case. Network uptime and RPC uptime are not the same. The ZKsync network can be healthy while your RPC provider is down, or vice versa. For production dApps, you need both.
Start by checking the official ZKsync status page for network-level incidents. Then evaluate your RPC provider's redundancy, failover, and historical performance. If you are just prototyping, a public endpoint may be enough. If you are serving users, plan for provider failure with multiple endpoints and automatic retries.
For a production setup, consider a provider like OnFinality that offers dedicated nodes and multi-region failover. You can compare plans on the RPC pricing page and see which networks are supported on the supported RPC networks page.
What Does ZKsync Uptime Actually Mean?
When people search for "zksync uptime," they usually want to know if the network is online. But uptime has multiple layers:
- Network uptime: The sequencer is producing blocks, and the network is processing transactions.
- RPC uptime: Your endpoint is responding to requests without errors.
- Data availability: Historical state and logs are accessible for your queries.
A network can be up but your RPC provider can be down. Conversely, the network can have an incident while your provider's cached data still serves some requests. Understanding these layers helps you design for resilience.
How to Check ZKsync Network Status
The official ZKsync status page is the first place to look. It tracks components like the sequencer, API, and explorer. You can also check third-party status aggregators, but they may have different definitions of uptime.
For real-time monitoring, you can set up your own health checks against the RPC endpoint. A simple JSON-RPC call to eth_blockNumber tells you if the node is syncing and responding.
curl -X POST https://zksync.api.onfinality.io/public \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'
If the response returns a block number, the endpoint is alive. If it times out or returns an error, you have a problem.
RPC Provider Uptime: What to Look For
Your RPC provider's uptime is critical. Public endpoints are convenient but often rate-limited and less reliable. For production, you need a provider with:
- Redundant infrastructure: Multiple nodes across regions to handle failures.
- Automatic failover: If one node goes down, traffic routes to another.
- Load balancing: Distributes requests to avoid overloading a single node.
- Historical data: Access to archive nodes for state queries.
OnFinality offers dedicated nodes and a global network of RPC endpoints. You can read more about the RPC service and dedicated nodes to understand the architecture.
Monitoring Your Own ZKsync Endpoint
Even with a reliable provider, you should monitor your own endpoint. Set up alerts for latency, error rates, and sync status. A simple script can check the latest block and compare it to the expected time.
const Web3 = require('web3');
const web3 = new Web3('https://zksync.api.onfinality.io/public');
async function checkSync() {
const block = await web3.eth.getBlockNumber();
console.log(`Latest block: ${block}`);
// Add logic to alert if block is stale
}
setInterval(checkSync, 60000);
You can also use WebSocket for real-time updates. Subscribe to new heads to detect stalls quickly.
const ws = new WebSocket('wss://zksync.api.onfinality.io/public');
ws.onopen = () => {
ws.send(JSON.stringify({jsonrpc: '2.0', method: 'eth_subscribe', params: ['newHeads'], id: 1}));
};
ws.onmessage = (event) => {
console.log('New block:', JSON.parse(event.data));
};
Common Causes of ZKsync Outages
ZKsync has had incidents in the past. For example, a server bug triggered a safety protocol that halted block production for several hours. Understanding common causes helps you prepare:
- Sequencer bugs: Software errors can stop block production.
- Prover issues: ZK proof generation can fail or slow down.
- Infrastructure failures: Cloud provider outages or network issues.
- Upgrades: Scheduled maintenance can cause brief downtime.
While you cannot prevent network-level incidents, you can mitigate their impact on your dApp by using multiple RPC providers and having a fallback plan.
Provider Evaluation Matrix
When choosing an RPC provider for ZKsync, compare these factors:
| Provider | Redundancy | Failover | Archive Data | WebSocket | Pricing Model |
|---|---|---|---|---|---|
| OnFinality | Global multi-region | Automatic | Available | Yes | Usage-based, free tier |
| Provider B | Regional | Manual | Limited | Yes | Subscription |
| Provider C | Single node | None | No | No | Pay-per-request |
OnFinality's infrastructure is designed for high availability. You can see the full list of supported networks and features on the supported RPC networks page.
Building Resilience into Your dApp
Even with a reliable provider, you should architect your dApp to handle failures gracefully.
- Use multiple providers: Configure fallback endpoints in your Web3 library.
- Implement retries with backoff: If a request fails, retry after a short delay.
- Cache critical data: Store recent blocks and transactions locally.
- Monitor and alert: Set up dashboards for RPC health and network status.
Here is an example using ethers.js with a fallback provider:
const { ethers } = require('ethers');
const primary = new ethers.providers.JsonRpcProvider('https://zksync.api.onfinality.io/public');
const fallback = new ethers.providers.JsonRpcProvider('https://another-provider.example.com');
const provider = new ethers.providers.FallbackProvider([primary, fallback], 1);
This setup automatically switches to the fallback if the primary fails.
Key Takeaways
- ZKsync uptime involves both network health and RPC provider reliability.
- Check the official status page for network incidents, but also monitor your own endpoints.
- Choose an RPC provider with redundancy, failover, and archive data for production.
- Build resilience into your dApp with multiple providers and retry logic.
- OnFinality offers robust infrastructure for ZKsync and other networks; see RPC pricing and supported networks.
Frequently Asked Questions
Q: How do I check ZKsync uptime?
A: Visit the official ZKsync status page or use a JSON-RPC call to eth_blockNumber to check if the network is responding.
Q: What is the difference between network uptime and RPC uptime?
A: Network uptime refers to the sequencer and network processing transactions. RPC uptime refers to your endpoint's ability to respond to requests. Both are important.
Q: Can I rely on public RPC endpoints for production?
A: Public endpoints are often rate-limited and less reliable. For production, consider a dedicated node or a provider with SLAs.
Q: What should I do if ZKsync has an outage?
A: Have a fallback provider and implement retry logic. Monitor the status page for updates and communicate with your users.
Q: Does OnFinality support ZKsync?
A: Yes, OnFinality supports ZKsync mainnet and testnet. See the ZKsync network page for details.