# Max virtualhosts

**URL:** <https://www.ruby-forum.com/t/max-virtualhosts/227670>\
**Category:** NGINX\
**Created:** [March 23, 2013, 11:14am UTC](https://www.ruby-forum.com/t/max-virtualhosts/227670 "2013-03-23T11:14:51Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![larry](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/47e85d/32.png) [@larry](https://www.ruby-forum.com/u/larry)\
**Post date:** [March 23, 2013, 11:14am UTC](https://www.ruby-forum.com/t/max-virtualhosts/227670/1 "2013-03-23T11:14:51Z")

</div>

Hi !

I was wondering, for the sake of curiosity, how many server blocks  
(virtual  
hosts) nginx can afford ?

To the extreme : will 1000 server blocks will decrease nginx  
performances ?

Cheers,

Larry

Posted at Nginx Forum:

> **[max virtualhosts](https://forum.nginx.org/read.php?2,237702,237702#msg-237702)**
>
> Hi ! I was wondering, for the sake of curiosity, how many server blocks (virtual hosts) nginx can afford ? To the extreme : will 1000 server blocks will decrease nginx performances ? Cheers, Larry

---

<div class="post-metadata">

**Author:** ![larry](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/47e85d/32.png) [@larry](https://www.ruby-forum.com/u/larry)\
**Post date:** [March 23, 2013, 11:51am UTC](https://www.ruby-forum.com/t/max-virtualhosts/227670/2 "2013-03-23T11:51:04Z")

</div>

On Mar 23, 2013, at 14:14 , Larry wrote:

> Hi !
> 
> I was wondering, for the sake of curiosity, how many server blocks (virtual  
> hosts) nginx can afford ?
> 
> To the extreme : will 1000 server blocks will decrease nginx performances ?

No. Unless server\_names are regular expressions.

–  
Igor S.

> **[Professional Services | NGINX](https://www.nginx.com/services/)**
>
> NGINX's Professional Services team will help you take your application infrastructure to a new level of performance, scalability, and security

---

<div class="post-metadata">

**Author:** ![larry](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/47e85d/32.png) [@larry](https://www.ruby-forum.com/u/larry)\
**Post date:** [March 25, 2013, 1:06pm UTC](https://www.ruby-forum.com/t/max-virtualhosts/227670/3 "2013-03-25T13:06:01Z")

</div>

Many thanks to both of you, you made my day 🙂

Larry

Posted at Nginx Forum:

> **[Re: max virtualhosts](https://forum.nginx.org/read.php?2,237702,237743#msg-237743)**
>
> Hi ! I was wondering, for the sake of curiosity, how many server blocks (virtual hosts) nginx can afford ? To the extreme : will 1000 server blocks will decrease nginx performances ? Cheers, Larry

---

<div class="post-metadata">

**Author:** ![larry](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/47e85d/32.png) [@larry](https://www.ruby-forum.com/u/larry)\
**Post date:** [March 23, 2013, 6:39pm UTC](https://www.ruby-forum.com/t/max-virtualhosts/227670/4 "2013-03-23T18:39:27Z")

</div>

On Sat, Mar 23, 2013 at 02:50:08PM +0400, Igor S. wrote:

> On Mar 23, 2013, at 14:14 , Larry wrote:
> 
> > I was wondering, for the sake of curiosity, how many server blocks (virtual  
> > hosts) nginx can afford ?
> > 
> > To the extreme : will 1000 server blocks will decrease nginx performances ?
> 
> No. Unless server\_names are regular expressions.

To elaborate more on this, here’s why:  
[http://nginx.org/en/docs/hash.html](http://nginx.org/en/docs/hash.html)
