Background: Need for Speed, Need for Scale
In the dim mists of history, as developers began exploring the possibilities of Ethereum, they encountered a significant technical burden that web2 developers hadn’t had to deal with: access to the blockchain.
In order to do anything on chain, their application had to have a connection to the network, to be able to show the user token information, and of course to submit transactions and interact with smart contracts. Ethereum had provided a way to do this out of the box: you sync a node of the network, and then interact with it through the Ethereum JSON-RPC API.
Simple enough, really, especially as Ethereum is an open network that anyone can sync; all the developer had to do was run a node alongside their dapp. The problem they began to encounter, however, was how to do this at scale.
As more and more users were simultaneously using a given dapp, the development team essentially had to manage both the app and something like a high-availability blockchain node cluster. The technical burden of running enough nodes, maintaining uptime, load balancing and everything else quickly exceeded the resources of many teams.
Infura was born of this necessity: always considered to be an iterative solution, the idea was to provide API access to a large number of nodes, ensuring that dapps always had a live blockchain connection, and removing the infrastructure burden from development teams.
Decentralizing Infura
For an in-depth, first-person account of how Infura was created, and how it will decentralize, check out this talk from EG Galano and Tim Myers from Devcon VI: Decentralizing Infura
Setting up access to Infura: Actually really easy
When you’re ready to start pushing and pulling data through Infura, all you’ll need is a valid email address and a password. Step through their Getting Started process here. From there, it’s a question of setting up an access key and choosing the network you want to interact with.
Infura is free to use for up to 100,000 requests a day; after that, there are tiers for different levels of traffic. For more details on how upgrading or downgrading works, check out our support articles on the topic.
Infura: Not just for Ethereum anymore
As the ecosystem expanded, matured, and changed, so has Infura. It offers API access to a number of EVM and non-EVM networks. In fact, for an up-to-the-minute view of what networks Infura is helping maintain, and their network health in Infura, check out their status dashboard at status.infura.io. Pro Tip: bookmark that for troubleshooting app outage reports.
Many networks, one Infura
If you’ve gotten to this point in this tutorial and haven’t thought about the differences between the various network architecture options available, jump to the Network Node.
Not Your Keys, Not Your Contracts
Remember: your Infura key is the kind of secret you don’t want to share in public. This may sound obvious, but it’s easier than we all want to admit to screw this up. In case you missed it, check out our article on Truffle Dashboard to avoid being in this position in the first place.
If your key has been compromised, we’ve got instructions on how to delete and replace it here.