Score:1

What is the maximum number of virtualhosts lighttpd can handle?

es flag

What is the maximum number of VirtualHosts a single lighttpd instance can handle?

I'd like to confirm some numbers before deploying lighttpd for production.

Here's a similar question for the old apache httpd.

Thanks.

diya avatar
la flag
Does this answer your question? [How do you do load testing and capacity planning for web sites?](https://serverfault.com/questions/350454/how-do-you-do-load-testing-and-capacity-planning-for-web-sites)
cachius avatar
kr flag
Is there a minimum amount of vhosts you must be sure are supported?
Score:1
la flag

What is the maximum number of VirtualHosts a single lighttpd instance can handle?

When you're configuration is smart, lighttpd does not impose any upper limit.

You can use mod_simple_vhost and have unlimited VirtualHosts. Adding or Removing VirtualHosts won't require any change in the lighttpd configuration, nor a reload. Simply create a directory and your new VirtualHost becomes active. Delete the directory and the VirtualHost is disabled.


In practice of course there will be limits: in addition to load and traffic that probably depends partly on how you configure each virtual host as well when you're not using mod_simple_vhost. Are you using TLS/SSL certificates, serving only static content or dynamically generated content?

For example, as in the Apache question you linked already mentions (somewhat casually), when you don't use mod_simple_vhost and explicitly configure each VirtualHost and configure them with their own separate error and access log files, you pay quite a performance penalty. For each additional log file a web server needs to maintain additional open file handles and you risk running out of file descriptors much more rapidly, compared to maintaining a single log file (with a format that adds a label/field to identify a particular virtual host).

Score:0
cn flag

What is the maximum number of VirtualHosts a single lighttpd instance can handle?

lighttpd does not have an arbitrary limit, and lighttpd config parsing for each request is generally much faster than comparable Apache config parsing.

That said, for any large number of virtual hosts, Apache and lighttpd both provide some pattern options that are more efficient than brute-force listing of each and every virtual host in the web server config.

lighttpd provides

as well as a do-it-yourself in custom lua scripts with

Again, patterns scale better than brute-forcing listing of each virtual host. For example, TLS wildcard certificates are useful in cases such as where the virtual hosts are all subdomains of a single domain. TLS certs with multiple SANs can be useful in other cases.

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.