logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: 10000 concurrent connections with Apache / Windows (C10K) Page Previous  1, 2, 3
Author
C0nw0nk



Joined: 07 Oct 2013
Posts: 241
Location: United Kingdom, London

PostPosted: Sun 01 Jun '14 1:55    Post subject: Reply with quote

This problem has been solved by ng4win.

With a custom built nginx version that beats the concurrent connection for windows to something crazy like 1million.

http://nginx-win.ecsds.eu/

Look at the following posts jimski : http://www.apachelounge.com/viewtopic.php?p=27713#27713
Back to top
covener



Joined: 23 Nov 2008
Posts: 55

PostPosted: Sun 01 Jun '14 2:54    Post subject: Reply with quote

C0nw0nk wrote:

With a custom built nginx version that beats the concurrent connection for windows to something crazy like 1million.


how does it avoid running out of ephemeral ports well before 1 million?
Back to top
C0nw0nk



Joined: 07 Oct 2013
Posts: 241
Location: United Kingdom, London

PostPosted: Sun 01 Jun '14 13:43    Post subject: Reply with quote

covener wrote:
how does it avoid running out of ephemeral ports well before 1 million?


You should probably direct that question at ng4win. I don't know if he follows this topic or not but he replies pretty quick in the other thread.
Back to top
ng4win



Joined: 25 May 2014
Posts: 78

PostPosted: Sun 01 Jun '14 14:45    Post subject: Reply with quote

"how does it avoid running out of ephemeral ports well before 1 million?"

You have to understand how an event driven system works, you can have thousands of requests/results working for a single port, the OS basically deals with most of this while nginx is waiting to be triggered.

Stuff to read about this:
http://stackoverflow.com/questions/3436808/how-does-nginx-handle-http-requests
http://en.wikipedia.org/wiki/Reactor_pattern

Under Windows there is no difference with how Linux deals with it, well there is of course kernel wise but the basic event based principle is the same.
Back to top
covener



Joined: 23 Nov 2008
Posts: 55

PostPosted: Sun 01 Jun '14 18:06    Post subject: Reply with quote

ng4win wrote:
"how does it avoid running out of ephemeral ports well before 1 million?"

You have to understand how an event driven system works, you can have thousands of requests/results working for a single port, the OS basically deals with most of this while nginx is waiting to be triggered.


Guess I'll answer myself for posterity. I was assuming nginx-as-a-proxy and at least hundreds of thousands of outbound proxy connections to go with the million inbound. But I guess those would generally be hitting a pretty big farm of servers and would have different remote IP's without something more sophisticated to avoid cycling throuh all ephemeral ports

(my curiosity is related to websockets tunnels, where it really would be useful to have hundreds of thousands w/o farming them out on the backend, but you can't just create a a hundred thousand idle connections to/from the same interface)
Back to top
ng4win



Joined: 25 May 2014
Posts: 78

PostPosted: Sun 01 Jun '14 19:49    Post subject: Reply with quote

covener wrote:
(my curiosity is related to websockets tunnels, where it really would be useful to have hundreds of thousands w/o farming them out on the backend, but you can't just create a a hundred thousand idle connections to/from the same interface)

Inbound and (proxied) outbound use the same techniques, how a backend deals with them is a different matter and might very well be limited by its design. Theoretically Windows sockets can handle about 4.2 billion concurrent sessions.
Back to top


Reply to topic   Topic: 10000 concurrent connections with Apache / Windows (C10K) View previous topic :: View next topic
Post new topic   Forum Index -> Apache Page Previous  1, 2, 3