Dynmap-Forge/Fabric

Dynmap-Forge/Fabric

888k Downloads

CDN related feature request

RuofengX opened this issue ยท 7 comments

commented

Hi!
I am a server holder, and I want to deploy dynmap behind a CDN, which could save a lot of request for my server.
But dynmap still missing some key feature to support CDN, like a non-zero cache-control head, and new/update tiles need sync through CDN.
Does dynmap have the plan to fully support CDN?

commented

We likely won't implement these changes. You are better off implementing them yourself or hiring a dev to make it for you specifically.

commented

No, there are currently no plans to support CDN deployment out of the box, its an incredibly niche feature as over 80% of the servers using dynmap don't even take the time to link the map to a domain or activate HTTPS.

commented

If you use an external web server, such as Apache or Nginx, you are free to control these things as you see fit. The built-in server is intended for simplicity, not as the most efficient way to handle a scalable solution - honestly, move to using an external server before worrying about CDN: Apache and Nginx serve files WAY more efficiently than Jetty, and are assured to give you maximum control over compute and memory impact on your server process vs on the variable and bursty load that having lots of web users doing 'god-knows-what' can have.

commented

Yes, i turned to use nginx and php already. It really boost my server. I'll check how to configure ngixn to support cdn. Thanks for reply <3

commented

I got an idea.
I want to deploy nginx and Java game server separately(in different instance), to reduce cpu use caused by nginx. But I found that dynmap must have the access to write the web folder to update things include player health, which means at least nginx and java game server must get deployed in one machine.
Another question is an object-storage native support (as storage method in place of mysql) considerable? Running a 100GB mysql is much expensive than a 100GB object-storage.

commented

Putting dynmap behind a CDN would not really save any bandwith, due to how picture are loaded from the same FQDN.

What you could look into instead:

Setting up a ReverseProxy OR a Real webbserver such as Nginx or Apache
Enable HTTP2
Enable GZIP
Enable Brotli

Do some browserside caching aswell, and you have a map that loads fast and nicely.

commented

I found that the key feature for CDN is missing in this project: #3423
I try to write a pr but the project is so big for me.