rewrite url from client to match filesys
September 19, 2009 03:25PM

I have a site that has aprox. 3000-4000req/sec on static content that is served by 3-5 servers running tomcat.
And I guess that it is possible to do this much more efficient with nginx as i have tried it successfully on other installations.

Problem is that the URL that is something like then need to be translated to the actual file on the filesys, /data/static/10/100/20/30000/39/ we don't want the end user to be able to know anything about the file system layout.

This is done with java and tomcat today, but target is to reduce the servers to two and that one should be able to take all the load if needed. There is lots of files on the filesys up to 50miljons and 6TB of data so for every server that can be saved it makes a difference in money spent on storage.

Soo should I do this using rewrite and regex or is it possible to use a perl script to do the calculation of the url?
Re: rewrite url from client to match filesys
September 19, 2009 08:06PM
I'm not going to be able to offer any real opinion on this except to say that you probably can use Perl if you desire. See It says "experimental" but I know for a fact there are some high load sites using it. Beware however, that it is blocking, and that may be limiting depending on how complicated the script is. If it's a short, simple script that may not be an issue. You certainly can also use a rewrite.

Likely the best approach is to try both on some test boxes and benchmark.

Jim Ohlstein
Re: rewrite url from client to match filesys
September 24, 2009 01:56PM
Thanks alot Jim

Will do some testing on this issue.
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 211
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 494 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready