10,000 Virtual Hosts in a Tomcat instance

2006-08-26 Thread KEGan
Hi, I am quite a Tomcat newbie. I am building an web application that host about 10,000 websites (only single static HTML for each website). Each website is reference using a subdomain i.e. website1.mycompany.com, website2.mycompany.com, and so on. So I am planning to add these subdomain as

Re: 10,000 Virtual Hosts in a Tomcat instance

2006-08-26 Thread Edoardo Panfili
KEGan ha scritto: Hi, I am quite a Tomcat newbie. I am building an web application that host about 10,000 websites (only single static HTML for each website). Each website is reference using a subdomain i.e. website1.mycompany.com, website2.mycompany.com, and so on. a question: why do you

Re: 10,000 Virtual Hosts in a Tomcat instance

2006-08-26 Thread KEGan
Edoardo, The websites can be added and edited dynamically by the corresponding owners. I am buidling something like Blogger.com. Where users can edit their websites and published it. The engine is built using Tapestry. Currently, I am using a servlet filter to forward Http requests to the

Re: 10,000 Virtual Hosts in a Tomcat instance

2006-08-26 Thread Mladen Turk
KEGan wrote: Hi, I am wondering if anyone has added 10,000 virtual hosts to Tomcat before, and whether Tomcat can handle this. There are no limits except memory available to the JVM. The performance itself should depend only on the file system, and I would suggest not to put all 1 homes

Re: 10,000 Virtual Hosts in a Tomcat instance

2006-08-26 Thread Mladen Turk
Edoardo Panfili wrote: a question: why do you want to use tomcat to serve static HTML, why Apache httpd isn't useful for you? Having 1 homes makes no difference if you use Tomcat or Httpd. In that case its more up to the OS rather then web server itself. Regards, Mladen.

Re: 10,000 Virtual Hosts in a Tomcat instance

2006-08-26 Thread Andrew Miehs
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 What is this supposed to become? Do you want 10,000 domains on the tomcat? or do you want 10,000 webapps? The JVM will die if you do this with 10,000 webapps Andrew On 26/08/2006, at 11:36 AM, Mladen Turk wrote: KEGan wrote: Hi, I am

Re: 10,000 Virtual Hosts in a Tomcat instance

2006-08-26 Thread Mladen Turk
Andrew Miehs wrote: The JVM will die if you do this with 10,000 webapps Why do you think it will die? There are systems with 64-bit JVM's and terabytes of memory. Regards, Mladen. - To start a new topic, e-mail:

Re: 10,000 Virtual Hosts in a Tomcat instance

2006-08-26 Thread Andrew Miehs
Ok - Theoretically it may work... Who do you know that has a machine with Terabytes of memory? And is using it for web hosting?! The JVM will spend all its time doing context switching and garbage collection... Andrew On 26/08/2006, at 11:49 AM, Mladen Turk wrote: Andrew Miehs wrote:

Re: 10,000 Virtual Hosts in a Tomcat instance

2006-08-26 Thread KEGan
Thanks Mladen for the valueable reply. Andrew, on your question : it is 10,000 domains that serves 10,000 different static HTML. One HTML for each domain. How much memory does 1 webapp takes in Tomcat ? Would it be ok with 10,000 domains pointing to 10,000 webapps but each webapp serves only

Re: 10,000 Virtual Hosts in a Tomcat instance

2006-08-26 Thread Mladen Turk
Andrew Miehs wrote: Ok - Theoretically it may work... Who do you know that has a machine with Terabytes of memory? And is using it for web hosting?! The JVM will spend all its time doing context switching and garbage collection... Look, there was a time when I thought that 1MB or RAM was

Re: 10,000 Virtual Hosts in a Tomcat instance

2006-08-26 Thread Andrew Miehs
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 If you are only delivering static content, then use Apache or Lighttpd http://www.lighttpd.net/ This is NOT what tomcat is designed for As for how much memory, no idea - but it cant be good Andrew On 26/08/2006, at 12:00 PM, KEGan wrote:

Re: 10,000 Virtual Hosts in a Tomcat instance

2006-08-26 Thread Mladen Turk
Andrew Miehs wrote: If you are only delivering static content, then use Apache or Lighttpd http://www.lighttpd.net/ This is NOT what tomcat is designed for In theory the threaded model should consume less memory and less CPU cycles compared with prefork model. Of course if your

Re: 10,000 Virtual Hosts in a Tomcat instance

2006-08-26 Thread KEGan
I tried to use only Tomcat since the static content is dynamically generated. Think blogging application. However, users dont update the data that often, that's why I generate the content and make it static for web access, as oppose to dynamically generate the content each time it is requested.

Re: 10,000 Virtual Hosts in a Tomcat instance

2006-08-26 Thread Andrew Miehs
Dear Mladen, Are we referring to 10,000 Virtual servers or 10,000 Connections? And the answer is yes to 1 connections. Yes I would use worker-mpm or better still an epoll based httpd daemon, like lighttpd or zeus. Regards Andrew On 26/08/2006, at 12:18 PM, Mladen Turk wrote: Andrew

Re: 10,000 Virtual Hosts in a Tomcat instance

2006-08-26 Thread KEGan
Referring to 10,000 virtual host in one tomcat instance. On 8/26/06, Andrew Miehs [EMAIL PROTECTED] wrote: Dear Mladen, Are we referring to 10,000 Virtual servers or 10,000 Connections? And the answer is yes to 1 connections. Yes I would use worker-mpm or better still an epoll based

Re: 10,000 Virtual Hosts in a Tomcat instance

2006-08-26 Thread Mladen Turk
Andrew Miehs wrote: Are we referring to 10,000 Virtual servers or 10,000 Connections? And the answer is yes to 1 connections. It does not matter. 1 Virtual hosts in Apache would require as much memory as 1 Hosts in Tomcat. Once when you break the JVM latency, there is no much

Re: 10,000 Virtual Hosts in a Tomcat instance

2006-08-26 Thread Andrew Miehs
Stupid question, Why don't you implement the 'virtual' hosts inside the one 'webapp'? And not create 10,000 web apps? That the App itself deals with the virtual hosts (by reading the host header), and not tomcat? Andrew On 26/08/2006, at 12:30 PM, KEGan wrote: I tried to use only Tomcat