UV_Labs
Published in

UV_Labs

Web3: Should I use Infura / Alchemy or Run a Node?

Quick Recap on Web3

Unless you have been living under a rock, you would have come across the term Web3, through a blog post, news articles, or some other source. Trust me, Web3 has been shaking the internet as it exists today.

Web3 is the culmination of a vision of serverless internet, the decentralized web. An internet where users are in control of their own data, identity, and destiny.

The Web3 stack looks something like that

  • Network Layer — aka Blockchain, the backend
  • Interaction Layer — aka Node providers, the AWSes of the blockchain world
  • Decentralized Applications — Customer interfaces to access Web 3.0, the “apps”

This article focuses on the Interaction Layer, specifically in relation to EVM based Blockchains.

Reason: Cause you are starting out on the Web3 development cycle and you need to know as why is the layer 1important, who provides that service, do I need it, etc etc

There are 2 approaches to work with the interaction layer:

  1. Using third-party service providers: Eg: Infura, Alchemy, QuickNode, OR
  2. Running your own node client: Eg, Geth

As you would have already guessed, there are pros and cons to both the options. 90% of the dapp development happens using the option 2; but without much analysis into this subject.

The objective of this article is to let you know of the pros and cons and then to help you make a decision on should follow the herd or break free.

OPTION 1: Using A Node Service Provider

  • As the name suggests Node service provider runs node clients behind the scenes for you so that you don’t have to. Each of its clients can then participate in “using” the node (obviously, it is shared). Heard economies of scale?!?, yes that is what comes into play over here now.
  • These service providers typically provide an API key that you can use to communicate with the node. Yes, all your provider.getBalance(0x) and others comes here.
  • Using these nodes is usually a plug and play through their SDK
  • There are various node providers out there like Alchemy, Infura, QuickNode offering these services.

To understand it in a better manner, the following table consists of some of the most popular node providers and their features.

Node Service Providers

For more information, check out this page

Pros of Using the above mentioned service providers

  1. Easy to Use; just plug and play using their own SDK or other Web3 JS libraries
  2. Instant Availability
  3. Back-up options available (should one node fail, the other comes up)
  4. Technical Support Team available
  5. No hassle of maintaining the Node Software; risks associated with Nodes
  6. Fractionalized Costing {more on this later}

Cons

  1. Third-party reliance (isn’t that exactly opposite to what blockchain ethos is all about)
  2. Cost (may be, may be not?)

OPTION 2 :Running Your Own Node.

By running our own Node we mean that your server stores the entire blockchain. You may choose whether your Node should validate every block of data before adding it to the blockchain (yes yes, we are talking about mining, proof of work when it comes to Ethereum Blockchain).

Although, running own node can be considered good practice but is not recommended due to its cost and time taken for the installation process.

  • A Full Node sync can take around a month or two for downloading the whole blockchain
  • The Light Node sync can take up to several weeks

There exist multiple clients on the internet that allow you to run their own Node based on various programming languages like Go, Rust, Typescript, etc.

Some client examples

Ethereum Node Clients

Pros of Using the above mentioned service providers

  1. You are the master of your own destiny. No more, API keys, No more purchase a plan, API Call limits, etc

Cons

  1. Costs
  2. Maintenance

Lets talk about the Costs (financial and then the time costs)

Costs of using 3rd party service providers

Providers like Infura and Alchemy provide a free tier to use their services. Obviously, there are limits to the number of API calls that you can make under the “Free Tier”. Currently, Infura permits 100,000 requests per day in the free tier, while Alchemy permits 300 Million requests.

Of course, the above-mentioned numbers are not small numbers, should be doing any form of initial stage development; testing; tutorials etc. But as soon as you go live with the a DAPP, which will easily bust the above limits, you are sitting with costs from Infura / Alchemy.

According to some recent records, on average, Uniswap sends around 30 million requests, Akropolis sends 2 million requests whereas, Sushiswap sends around 25 million requests per day.

Now there is a lot of structuring involved. For eg, if we are designing a DAPP, we do not make our API endpoints public and hence, when our users connect to our DAPP, their wallet connects to a service provider. Hence, do not fret the above numbers straight away.

However, on average, we have witnessed that if you are maintaining a backend to analyse your smart contract data, performance and various other factors, you are definitely looking at ~$200 costs per month.

Costs of running your own node

Aspect 1: Financial (the easily measurable factor)

Hardware requirements to run your own node:

  • At least 2TB of SDD (yes, we are forward looking and are planning to run the full node)
  • 4GB Ram (oh common, don’t be cheap with a 2GB ram now)
  • Connected to the internet 24*7
  • Intel NUC, 7th gen or higher (x86 processor)

On an average, based on the above requirements, we understand that it costs roughly ~600$ a month

Aspect 2: Manpower Costs

It would typically require one of your engineers to least spend 30 mins each day just to monitor the performance of the node; we are also expecting a here and there break-down and hence, more time involvement. This will cost us ~24 hours a month, ie, ~ $1,200 per month.

Conclusion

Running our own node can cost you an estimated cost of $22K / year, compared to an estimated cost of $2,400 / year on account of using 3rd party service providers.

Using a service provider can ease out the process and cut the whole time-consuming instructions. Nonetheless, reliability and some other factors do make the case for running your own node worth considering.

There you go! Now you have the pros and cons. It is, probably, now obvious why majority of the dapp developers in the world choose 3rd party service providers.

However, you need to understand that both of the approaches play a major role individually, and it only you who can determine which approach suits you best.

We would love to know your thoughts; we are open to learn and hence if you think we have missed out anything; more than happy to know.

Authors (open to feedback): Amateur-Dev and Pari Tomar

We are group of Nerds, trying out different stuff on blockchain and most importantly having fun

Recommended from Medium

Not Coding for Coders. Let’s Have a Little Break.

How to Create a Horoscope API with BeautifulSoup and Flask

H2: IoT hardware for a 12-factor application

CI/CD with Gitlab & Kubernetes

Free Software is the only winner in Elastic NV vs AWS

How to Generate Awesome SVG Icons for Free

TrustBase and Idavoll reach a strategic cooperation

How to implement memory records tool based on MallocStackLogging

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Amateur-Dev

Amateur-Dev

Coding and Learning and Coding and Learning

More from Medium

Transaction Order dependence(TOD) in Ethereum node 😐 😜

Deploying Smart Contracts like a Pro!!!

Get Started with Zero-Knowledge Proof — Blockchain Roadmap