Static website performance

Hi, as I was reading many articles about hosting static websites on STORJ DCS, I am wondering about the performance when doing this. The example pages of some bloggers look really nice and were loading fast for me, but I am wondering what would be the limit for STORJ hosted static websites. I mean how many simultaneous visitors are the maximum?

Let’s assume I am hosting a 200 KB HTML file which references images with a total size of 1MB. If I have 1.000, 10.000 or even more simultaneous users for that site who want to load the content, all the traffic would go to only a very few storagenodes which will most probably not be able to handle the load, I guess.
Does someone have some experience with what maximum number of parallel requests to a file are realistically possible?

1 Like

I’m not sure but maybe it is possible to upload the static site multiple times to storj to increase the nodes where the site is saved.

It doesn’t work like this. The previous version would be deleted and there would be only one version and the same number of nodes, but they could be a little bit different (from other locations).

The solution for that is scaling, as described in the Whitepaper: https://www.storj.io/storjv3.pdf

But it’s not implemented yet.

3 Likes

With the new pricing using Storj as CDN actually becomes really interesting. The pricing basically beats everything on the market. That scaling feature would be really great to serve those use cases.

Until scaling is implemented, the storj static hosted site could be a node behind a load balancer. I’m thinking about doing this myself for failover. Storj will always be up, my servers might not.

For what it’s worth, you can get a really great experience by using Cloudflare or Fastly here. A CDN frontend such as one as these will not only handle high traffic situations for you, but will also add SSL.

If you’re interested in a really easy webhosting solution, I suggest

  1. Upload your site to sj://bucket/prefix/. You can use gateway.us1.storjshare.io with the awscli which supports recursive copy and folder sync. (uplink cp is getting a recursive feature natively very soon.)
  2. Registering a domain name and making Cloudflare (for example) your domain’s DNS name servers. Let’s say your domain is mytestwebsite.com
  3. Adding the DNS settings from uplink share --dns=mytestwebsite.com sj://bucket/prefix/ to Cloudflare and enabling Cloudflare proxying and SSL.

This works great for both providing SSL and adding a layer of caching for heavily trafficked websites. We have a number of customers doing this type of thing. My personal site is small potatoes and only gets ~56k requests/month, but https://www.jtolio.com/ is set up this way. Check out https://www.jtolio.com/?wrap=1

In the long term we hope to make Fastly/Cloudflare/etc unnecessary, but we’re not quite there yet.

6 Likes

Thank you for the fast replies :slightly_smiling_face:
Scaling sounds really interesting! Also for other use cases as static website hosting.

I will definitely try the Cloudflare solution for now, thanks for that hint :slight_smile: :+1:

2 Likes