Own server vs Speedy node

Hi,

I’m not sure what the performance difference is between

  1. using web3 api to call a moralis speedy node
  2. creating my own server with moralis, then sending a http request to it so that a cloud function can execute a web3 function

Please could you advise? Thanks

if you have that in front end, then you would want to not save your speedy node url in front end because after that anyone else could also use your speedy node

connecting directly to speedy node may be faster, but it is not always recommended, as the above example with frontend

Sorry, I think you misunderstand what I am asking - calling the speedy node from the back-end is fine.

So what is the performance difference between calling moralis speedy node from back-end using web3 and creating a moralis server with a cloud function that calls web3 itself?

Calling a speedy node is a much easier setup. Is it that creating your own server means that it’s resources are dedicated to just you? If this is the case then the speedy node is actually not as speedy :thinking:

if you only want to connect to a speedy node, it would be easier and faster to do it directly

I think I’m right in saying that you can’t run many web3 transactions from Moralis cloud code. For example, I was trying to do a web3.getTransaction(“0xblah”) from a cloud function and wouldn’t return anything when the same command worked fine from a front end.

Of course, I may have just done something wrong. If anyone else has managed a cloud code web3.getTransaction() then please let me know!

If you are looking to return a transaction matching a given transaction hash, then why not just use the getTransaction end point?
https://docs.moralis.io/moralis-server/web3-sdk/native#gettransaction-new