Load balancer / cache

Hi, I want to make some tests in order to determine how many virtual machines I need to use for my game. I understand that cloudflare actually caches static content and is able to deliver from different data centers, which is great.

What puzzles me is if all of my game is static, would I obtain any additional gain by using a load balancer + say for instance, beefier (more ram / vcpu) vps machines?

Hi @es700x!,

I understand that cloudflare actually caches static content

Cloudflare’s default caching
depending on:

  • where your visitors come from,
  • which Cloudflare data center your visitors reach, and
  • how often visitors request a resource at the specific data center.

Cloudflare only caches a resource within the Cloudflare data center that serves the request and doesn’t cache:

I suggest having a look in our Docs and get more important details about caching:

I want to make some tests in order to determine how many virtual machines I need to use for my game.

If your game is static, check above in the link what Cloudflare caches, and then you can use Page rules to cache additional content:

At this point also is useful to play with the caching level:

Also speaking about static content, did you know Workers? Check more details about Workers and caching in our DOCS

Load Balancer is a bit more complicated setup, however in your case, I don’t think that you will have to use that, at least for now.
If you need to add additional servers, later, to balance the loads of your visitors, you can add additional LB’s (Cloudflare Load Balancers) I think is what you need to check here.
Cloudflare Load Balancing provides DNS-based load balancing and active health checks against origin web servers and pools that you will use for your game.

I will be happy to help in any other question you may have

3 Likes

Thanks @stefano1 I indeed applied a page rule previously *gamedomain.net/* set to cache all. Some of the file extensions are not so common (.data, .assets) and seems they aren’t cached by default, please just let me know if that sounds about right (they’re too in subdirectories).

Was wondering because haven’t found a way to load test and we are expecting to have about 2000 concurrent users - but yet again not a dynamic game (no database access, no server processing of data), and would hate to overload with current setup.

When is it a good time to think about load balancing? Is it “only” for dynamic processing?

Not in original question, but can I also use cloudflare (I imagine I need streaming service) to cache .mp4 videos? Can I call them from unity engine? (need absolute URI: gamedomain.net/videos/video01.mp4 )

can you share a link here, if you prefer to don’t share link can you open a ticket and let me know here the ticket number?

Check the apache bench if it is ok for you, I am sure you can find more

I am not sure that anyone could give a specific answer to the question when is it a good time to think about load balancing. I would check my server load and requests analytics logs etc, and in general I would take such a decision when those metrics are starting to grow, to prevent any unwanted situations.

Not in original question, but can I also use cloudflare (I imagine I need streaming service) to cache .mp4

Can you please open a new thread about that, we would like to have the questions categorized.
thanks.

1 Like

Thanks, I couldn’t find the option to open a ticket. Would you mind to please tell me how-to?

you can just email [email protected] or

click here and direct request within your Cloudflare dashboard:

Scroll down to Get additional help and follow the steps.

2 Likes

Hi Stefano, ticket number is: 1974679

2 Likes

thanks for letting me know, will go and check and let you know!

1 Like

Hey! I’ve answered the ticket, but I had to give a very generic answer, because your website on maintenance mode…

So next step here is to run some tests on your side, and in case that you have any issues, just let us know, so we can have a look!

Thanks Stefano, will check it out.