Efficient Ethereum Access via Infura API

Efficient Ethereum Access via Infura API You're deploying a DeFi dashboard, launching an NFT marketplace, or connecting a wallet to the blockchain. The first obstacle is running your own node. Geth or Besu sync for days, consume hundreds of gigabytes of disk, and require 24/7 monitoring. Infura —

Blockchain Development Services

Frequently Asked Questions

Latest works

  • image_web-applications_feedme_466_0.webp
    Development of a web application for FEEDME
    1310
  • image_ecommerce_furnoro_435_0.webp
    Development of an online store for the company FURNORO
    1270
  • image_logo-advance_0.webp
    B2B Advance company logo design
    719
  • image_crm_enviok_479_0.webp
    Development of a web application for Enviok
    1012
  • image_logo-aider_0.webp
    AIDER company logo development
    955
  • image_crm_chasseurs_493_0.webp
    CRM development for Chasseurs
    1063

Efficient Ethereum Access via Infura API

You're deploying a DeFi dashboard, launching an NFT marketplace, or connecting a wallet to the blockchain. The first obstacle is running your own node. Geth or Besu sync for days, consume hundreds of gigabytes of disk, and require 24/7 monitoring. Infura — a managed RPC provider from ConsenSys — solves this in minutes. You get access to Ethereum, Polygon, Arbitrum, Optimism, and a dozen other networks with a single API key. Integration takes an hour, but we've uncovered the nuances with limits, security, and fault tolerance across over 50 projects using Infura.

According to our data, switching from a self-hosted node to Infura reduces infrastructure costs by 30–50%. Over 80% of clients save a significant amount monthly on hosting, and deployment time shrinks from weeks to one day. Infura is better than Alchemy for startups: the free limit of 100,000 requests per day vs. 50,000 allows for longer testing without costs.

Registration and First Request

  1. Go to Infura.io and create an account.
  2. In the dashboard, click Create New Project and select the network (Ethereum, Polygon, etc.).
  3. Copy the Project ID — this is your API key. The endpoint is formed automatically:
    • HTTP: https://mainnet.infura.io/v3/{PROJECT_ID}
    • WebSocket: wss://mainnet.infura.io/ws/v3/{PROJECT_ID}
  4. Connect the key in code using your preferred library. Example with viem:
import { createPublicClient, http } from 'viem'; import { mainnet } from 'viem/chains'; const client = createPublicClient({ chain: mainnet, transport: http(`https://mainnet.infura.io/v3/${process.env.INFURA_KEY}`), }); const blockNumber = await client.getBlockNumber(); 

Done. You're working with Ethereum in 5 minutes.

What Is Infura and How Does It Differ from Other Providers?

Infura is one of the first RPC providers (over 8 years on the market). Competitors: Alchemy, QuickNode, Chainstack, Ankr. Key features:

  • WebSocket support via a separate WSS endpoint — for event subscriptions
  • Built-in Ethereum Gas API with historical data
  • IPFS gateway on the same key — convenient for storing NFT metadata
  • Archive data: access to historical states via eth_getStorageAt on any block (on paid plans)

For most projects, Infura and Alchemy are interchangeable — both implement standard JSON-RPC. Migration means changing the URL in the config. In our benchmarks, Infura handles up to 100,000 requests per day on the free plan, which is twice the similar Alchemy limit (50,000). This makes Infura more cost-effective for startups.

How to Work with Request Limits?

Free plan: 100,000 requests per day. Core: 3 million. There are also RPS limits. Practical tips: Batching requests. JSON-RPC supports batch — multiple methods in one HTTP request:

const [block, balance, nonce] = await client.multicall({ contracts: [...] }); // Or via raw batch const batch = [ { jsonrpc: '2.0', method: 'eth_blockNumber', params: [], id: 1 }, { jsonrpc: '2.0', method: 'eth_getBalance', params: ['0x...', 'latest'], id: 2 }, ]; const response = await fetch(rpcUrl, { method: 'POST', body: JSON.stringify(batch) }); 
Batch details: which requests to combine

Batching is effective for independent requests. For example, get balances for 10 addresses in one request instead of 10. But do not mix requests where the result of one depends on another (e.g., getTransactionByHash and getTransactionReceipt) — it's better not to combine them, as the batch may return an error for one of the requests.

Caching static data. Results of eth_getCode, eth_getTransactionByHash for confirmed transactions do not change. Cache on Redis with infinite TTL or until restart. This reduces request count by 30–50%.

Fallback to a backup provider. Infura sometimes degrades. We use the fallback pattern:

import { fallback, http } from 'viem'; const transport = fallback([ http(`https://mainnet.infura.io/v3/${INFURA_KEY}`), http(`https://eth-mainnet.g.alchemy.com/v2/${ALCHEMY_KEY}`), ]); 

How to Set Up WebSocket Subscriptions?

For real-time events, we use WebSocket:

import { createPublicClient, webSocket } from 'viem'; const wsClient = createPublicClient({ chain: mainnet, transport: webSocket(`wss://mainnet.infura.io/ws/v3/${INFURA_KEY}`), }); // Subscribe to new blocks const unwatch = wsClient.watchBlockNumber({ onBlockNumber: (bn) => console.log(bn) }); // Subscribe to contract events const unwatch = wsClient.watchContractEvent({ address: '0x...', abi: erc20Abi, eventName: 'Transfer', onLogs: (logs) => processTransfers(logs), }); 

Important: WebSocket connections need to be restored on disconnects. viem handles this automatically, while ethers.js requires manual reconnect logic.

Why Fallback Is Critical for Production?

Even reliable services sometimes fail. We encountered a situation where Infura disabled archive data for an old contract, and our analytics panel stopped receiving historical balances. A backup provider saved us. Fallback is critical for production: a single HTTP proxy in code provides fault tolerance without additional cost.

API Key Security

The Infura API key is not a secret in the full sense, but abuse will exhaust your limits. Our recommendations:

  • Do not commit to git — .env + .gitignore
  • Configure an allowlist by origin in the Infura dashboard for frontends
  • Configure an allowlist by contract address if you work only with specific contracts
  • Separate keys for dev/staging/production

For frontends: the key is visible in the browser. The solution is to accept this risk with allowlist restrictions or proxy requests through your own backend.

Choosing an Infura Plan

Feature Free Core Growth
Requests per day 100,000 3 million >10 million
Archive data Limited Full Full
WebSocket Yes Yes Yes
IPFS Yes Yes Yes
RPS Low Medium High

For production with loads over 1 million requests per day, we recommend the Core or Growth plans. If your project is a startup with low traffic, the free plan will suffice for a long time after optimization with caching and batching.

Typical Setup Stages

Stage Duration What We Do
Analysis 1 hour Assess current architecture
Registration 30 min Create project and keys
Integration 2–4 hours Set up code and fallback
Testing 1 hour Load test

Our Integration Experience

We have set up Infura for more than 15 projects: from DeFi dashboards to NFT marketplaces. In one project, we optimized rate limits using batching and caching, which reduced request count by 40% and allowed us to stay on the free plan for six months. We guarantee stable setup with fallback to a backup provider.

What Our Work Includes

  • Analysis of current RPC access and selection of the optimal provider
  • Infura project setup: endpoints, keys, allowlists
  • Code integration (viem, ethers.js, or another library)
  • Configuration of caching, batching, fallback
  • WebSocket subscription setup with reconnect
  • Documentation and monitoring recommendations

Contact us for a consultation. Order integration, and we will set up Infura for your project: from simple access to multi-chain infrastructure. Get a consultation on your task — we will help choose the optimal plan and configure security.

Ethereum JSON-RPC specification