Jonathan Matthews
December 22, 2012 06:28PM
On 22 December 2012 22:19, Friedrich Locke <friedrich.locke@gmail.com> wrote:
> Hey,
>
> this is my first message to this mailing list. I am not, right now, using
> nginx, but i would like to do so.

Good plan. It's a very flexible HTTP server and router.

> My intent is the following:
>
> I would like to build a farm of x web server. I would like to perform load
> balance among them. I need high performance and high availability for a set
> of 100k domains to hosted within this farm of web server. The requirement i
> was presented with is that a domain must be served by at least 3 server.

That's very achievable. At mass-hosting volumes like these, you'll
need to distinguish between static site hosting and dynamic
application hosting. Doing the former at volume is (almost!) trivial
using nginx; doing the latter will be more ... interesting.

> I want to use nginx as web server; and could use nginx or varnish as reverse
> proxy, which ever would be a better approach.

If you mean a pure reverse proxy with responsibility other than HTTP
routing, then nginx is very well suited to this. If you want to bring
back-end health checks and HTTP caching into the mix as well, then I'd
suggest supplementing nginx with Varnish (caching) and HAProxy (health
checks). Whilst nginx can fulfil both these functions, I prefer those
other two tools for various operational reasons.

> Some doubts arose :
>
> 0) Do i need to have the html/jpeg/php/* of a given domain replicated on
> each of the http server i want to serv that domain ?

Generally yes, but you may wish to research network attached storage
(NAS) and cluster filesystems for a common solution to this scaling
problem.

> 1) What happens if a web client upload a file to that domain, it (the file)
> get saved in a http server and the next request of that web client to the
> domain goes to a second http server the upload file is not there ?

You don't mention if this is the site admin uploading files to the
site, or user generated content (UGC) being provided by users

In general, the former is something you'd need to solve in the same
way you solved for your question #0, above. The latter is generally an
application-level problem, which may well use the replication/etc
strategies provided by the solution to #0, but really isn't obliged
to.

> 2) What about session? User authenticated session ? How does nginx manage
> such? A given server could have information about a session and the other
> server that serves the domain too is not aware about the session.

You would normally solve this at the application or application framework layer.

HTH,
Jonathan
--
Jonathan Matthews // Oxford, London, UK
http://www.jpluscplusm.com/contact.html

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

high performance infra strutucre

Friedrich Locke December 22, 2012 05:20PM

Re: high performance infra strutucre

Jonathan Matthews December 22, 2012 06:28PM

Re: high performance infra strutucre

Friedrich Locke December 22, 2012 08:10PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 254
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready