Questions about hosting website on ipfs

I am trying to follow the example of hosting website on ipfs.
I have 2 questions:

  1. I have a A record points my domain to 127.0.0.1:8080 port through nginx on my server which is used to run a node of ipfs. After I ipfs name publish $SITE_CID, and try to load url [my domain]/ipns/$PEER_ID, it is slow and sometimes return 504 Gateway Time out. I also tried to curl http://localhost:8080/ipns/$PEER_ID on my server, but it is also very slow. And I tried gateway.ipfs.io/ipns/$PEER_ID, it hangs forever.
  2. What is proper value for Ipns.RepublishPeriod?

hi,

for the 2 questions the max value into ipns-republish is 24 hours. so you need to created cron or a service to republish ipns every 24 hours.

for 1 i’m not sure to have knowledge for that.

regards

I am not totally sure, but IPNS is really too slow. For me it also takes a lot of time (10-20 mins) to get discovered. But once it’s discovered, it get’s resolved instantly every time, till it get’s expired(after 24 hours).