Store the subdomain of the server instead of the IP in the .cache folder.
#1

Hi.

I'm doing load balancing on my server and I have about twenty different IP's to access the server. When a person enters through an IP different from the previous one, they must download all the files again and this process is slow, since the weight of the totality of the files is 200 MB.

I suggest that the files be stored with the subdomain name of the server (in case of having it added to the client), not only with the IP. This solves the problem.

I also make another suggestion. My files when compressed in a .rar or .zip weigh around 50 MB and decompressed 200 MB. Is it possible for the files to be downloaded compressed and the SA-MP client automatically unzip them (allowing only .dff and .txd, clearly) in the folder?

This would benefit the download speed (it is faster to download a file with more weight than doing several simultaneous downloads) and would help to filter the files with the desired extension.

Thanks for your time @Kalcor.
Reply
#2

For the domain good idea or maybe jsute a files .rar/.zip to send to people and they decompress?
Reply
#3

Quote:
Originally Posted by tysanio
View Post
For the domain good idea or maybe jsute a files .rar/.zip to send to people and they decompress?
I can compress the files on my server, send them to my users and have them unzip it. The idea is that this process is done automatically by the SA-MP client.
Reply
#4

Isn't this what OnPlayerRequestDownload(playerid, type, crc) and RedirectDownload(playerid, url[]) is for?
Reply
#5

Quote:
Originally Posted by Chaser98
View Post
Isn't this what OnPlayerRequestDownload(playerid, type, crc) and RedirectDownload(playerid, url[]) is for?
No. These functions download the .dff and .txd files from a mirror (functions that i'm already using) but they don't allow downloading a .rar or .zip file and that the SA-MP client automatically unzips the files in the folder.
Reply
#6

AFAIK The only compression supported right now is gzip, which is handled by web server software. This might be of use to you - https://varvy.com/pagespeed/enable-compression.html

I don't know how well it can compress but it's worth a try.
Reply
#7

Quote:
Originally Posted by Chaser98
View Post
AFAIK The only compression supported right now is gzip, which is handled by web server software. This might be of use to you - https://varvy.com/pagespeed/enable-compression.html

I don't know how well it can compress but it's worth a try.
I'm going to try it, it sounds good but i don't know to what extent you can reduce the size of the .txd and .dff files. Thank you!

EDIT: I have already applied it on my server but the reduction of any type of file is very minimal. Is not sufficient.



In the same way the idea was not bad, thanks for trying to help me
Reply
#8

This is already responded! Take your time to look around:

https://sampforum.blast.hk/showthread.php?tid=644192

Plus, you should use nginx instead of apache for these things. nginx has better deflating options and caching too so you don't overload you 20 spf servers. Looks like everything you do it's copy pasted!
Reply
#9

Quote:
Originally Posted by AdrianGraber
View Post
This is already responded! Take your time to look around:

https://sampforum.blast.hk/showthread.php?tid=644192

Plus, you should use nginx instead of apache for these things. nginx has better deflating options and caching too so you don't overload you 20 spf servers. Looks like everything you do it's copy pasted!
I'm using nginx and not only that; i use an IP load balancing to distribute the downloads of each country. If you are from the United States, you will download from a server in the United States. If you are from Spain you will download from a server in Spain. If you are from Argentina you will download from Argentina.

I had not seen your thread, but it's nice to know that i'm not the only person with this problem.
Reply
#10

You mean cloudflare? That’s the thing that’s messing with your compression. Try without cloudflare
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)