9 Ethereum Dev Tricks for Infura & Alchemy Power Users
You’ve got a killer dApp idea. But connecting to the Ethereum blockchain without running your own node? That’s where Infura and Alchemy come in. These services handle the heavy lifting, but most devs only scratch the surface. Let’s fix that.
Here are nine ways to squeeze every drop of performance from your Ethereum RPC provider. Whether you’re building on mainnet or testing on Sepolia, these tips will save you time, money, and headaches.
1. Ditch the Free Tier Before You Launch
The free tiers on both platforms are great for prototyping. Infura gives you 100,000 requests per day. Alchemy offers 300 million compute units per month. Sounds like a lot, right? But a single NFT mint can burn through 5,000+ compute units. And if your dApp goes viral? You’ll hit rate limits fast.
Upgrade to a paid plan early. For $49/month on Alchemy’s Growth plan, you get 40 million compute units and priority access. Infura’s Developer plan runs $50/month for 500,000 requests. It’s cheap insurance against your app going dark during a launch.
2. Use WebSocket for Real-Time Data
Polling every 12 seconds for new blocks? That’s amateur hour. Both Infura and Alchemy support WebSocket connections. You subscribe to new block headers or pending transactions once, and the server pushes updates to you.
Your code becomes cleaner and your users see updates instantly. Here’s the syntax for Alchemy: const ws = new WebSocket('wss://eth-mainnet.g.alchemy.com/v2/YOUR_API_KEY'). For Infura, swap the URL to wss://mainnet.infura.io/ws/v3/YOUR_PROJECT_ID. WebSocket cuts your request volume by 80% or more.
3. Master Alchemy’s Enhanced APIs
Alchemy isn’t just a JSON-RPC proxy. It offers specialized endpoints that save you multiple calls. Need token balances for a wallet? Use alchemy_getTokenBalances instead of iterating through every contract. Want transaction history? alchemy_getAssetTransfers returns filtered results in one shot.
These enhanced APIs reduce your compute unit consumption by 60-70%. For a DeFi dashboard that tracks 20 tokens, you’d go from 20+ RPC calls to just two. That’s not just faster—it’s cheaper.
4. Batch Your Requests Like a Pro
Each HTTP request has overhead. Both Infura and Alchemy support JSON-RPC batching. You send an array of requests in a single POST, and they return an array of results.
Imagine you need balances for 50 addresses. Without batching, that’s 50 separate calls. With batching, it’s one. On Alchemy’s Growth plan, batching alone can cut your compute unit usage by 40%. Infura treats batched requests as one call toward your daily limit. Always batch when you can.
5. Use Alchemy’s Mempool Watcher
Want to see pending transactions before they’re mined? Alchemy’s WebSocket endpoints include alchemy_pendingTransactions. This streams every transaction entering the mempool, with full details.
Why does this matter? You can build MEV bots, track whale movements, or show users their pending transactions in real-time. Infura offers basic pending transaction support via eth_subscribe, but Alchemy’s version includes richer data like gas prices and transaction types. For a trading dashboard, this is gold.
6. Set Up Proper Error Handling
Your node provider will fail. It’s not if, but when. Rate limits spike, services go down, or your API key gets rotated. Your code needs to handle these gracefully.
Implement exponential backoff with jitter. If you get a 429 (rate limit) or 503 (service unavailable), wait 1 second, then 2, then 4, up to 32 seconds. Add random jitter so all your users don’t retry at the same second. Both Infura and Alchemy provide error codes in their responses. Log them, analyze them, and build fallbacks.
Pro tip: Run a secondary provider as backup. If Alchemy fails, failover to Infura. This adds redundancy without much complexity.
7. Leverage Archive Node Features
Need to query historical state from 2021? You need an archive node. Both Infura and Alchemy offer archive data on higher-tier plans. Alchemy’s Growth plan includes 14 days of archive access. Infura’s Developer plan gives you 30 days.
Why use archive data? Building a portfolio tracker that shows historical balances. Auditing a contract’s past interactions. Or verifying a transaction from two years ago. Without archive access, you can only see the last 128 blocks. That’s about 25 minutes of history.
8. Monitor Your Usage with Dashboards
You can’t optimize what you don’t measure. Both providers offer real-time dashboards. Alchemy’s shows compute unit consumption per endpoint, error rates, and latency percentiles. Infura’s dashboard tracks request volume, response times, and error breakdowns.
Set up alerts when you hit 80% of your daily limit. Check your dashboard weekly to spot inefficient calls. I once found a bot that was calling eth_blockNumber every second—completely unnecessary. Fixing that saved $200/month in compute units.

9. Use the Right Network for Testing
Never test on mainnet unless you’re a masochist. Both providers support testnets like Sepolia and Goerli. But here’s the trick: use Alchemy’s Sepolia faucet for free test ETH. Infura doesn’t offer one, so you’ll need to find external faucets.
Better yet, use Alchemy’s custom networks for private testing. You can fork mainnet state at a specific block and run tests in isolation. This is invaluable for simulating complex DeFi interactions without real money. For more on testnet strategies, check out .
| Feature | Infura | Alchemy |
|---|---|---|
| Free tier limits | 100k requests/day | 300M compute units/month |
| Enhanced APIs | Basic | Advanced (token balances, transfers) |
| WebSocket support | Yes | Yes (with mempool watcher) |
| Paid plan start | $50/month | $49/month |
| Archive access | 30 days (Developer) | 14 days (Growth) |
| Testnet faucet | No | Yes (Sepolia) |
The One Thing to Remember
Your node provider is a tool, not a solution. Master batching, WebSocket connections, and enhanced APIs to cut costs and boost performance. And always have a backup plan—the blockchain doesn’t wait for your RPC to come back online. Build smart, test hard, and ship fast.
