multi threading support
Hi, i wanna know how does openvpn server handles multiple requests? for example if there is an active connection with a client on 1194 port and another requests from some other client comes in what will happen? Is this task managed in operating system or by openvpn itself?
Thanks
Hi,
Quoted 5 lines · ehsan enayati
Hi, i wanna know how does openvpn server handles multiple requests? for example if there is an active connection with a client on 1194 port and another requests from some other client comes in what will happen? Is this task managed in operating system or by openvpn itself?
OpenVPN itself (single-threaded with smart work queues).
Multi-Threading might happen in OpenVPN 3.0.
gert
Signature · 4 lines
USENET is *not* the non-clickable part of WWW!
//www.muc.de/~gert/
Gert Doering - Munich, Germany [email protected]...
fax: +49-89-35655025 [email protected]...thanks for your quick reply, I know that openvpn is single threaded but it supports multiple user connection simultaneously, I wanted to know how this is done although it just have one thread. thanks
-
________________________________
From: Gert Doering <[email protected]...>
To: ehsan enayati <[email protected]...>
Cc: "[email protected]" <[email protected]>
Sent: Monday, September 24, 2012 12:48 PM
Subject: Re: [Openvpn-devel] multi threading support
Hi,
Quoted 5 lines · ehsan enayati
Hi, i wanna know how does openvpn server handles multiple requests? for example if there is an active connection with a client on 1194 port and another requests from some other client comes in what will happen? Is this task managed in operating system or by openvpn itself?
OpenVPN itself (single-threaded with smart work queues).
Multi-Threading might happen in OpenVPN 3.0.
gert
Signature · 4 lines
USENET is *not* the non-clickable part of WWW! //www.muc.de/~gert/ Gert Doering - Munich, Germany [email protected]... fax: +49-89-35655025 [email protected]...
Hi,
Quoted 1 line · ehsan enayati
thanks for your quick reply, I know that openvpn is single threaded but it supports multiple user connection simultaneously, I wanted to know how this is done although it just have one thread.
"by sufficiently advanced magic"
gert
Signature · 4 lines
USENET is *not* the non-clickable part of WWW!
//www.muc.de/~gert/
Gert Doering - Munich, Germany [email protected]...
fax: +49-89-35655025 [email protected]...Quoted 7 lines · Gert Doering
Hi,
Quoted 1 line · ehsan enayati
thanks for your quick reply, I know that openvpn is single threaded but it supports multiple user connection simultaneously, I wanted to know how this is done although it just have one thread.
"by sufficiently advanced magic"
The magic is called "multiplexing connections" :)
I saw in the linux source code that it uses fork and pthread, i think that's the way it handles multiple requests
________________________________
From: Gert Doering <[email protected]...>
To: ehsan enayati <[email protected]...>
Cc: "[email protected]" <[email protected]>
Sent: Monday, September 24, 2012 12:48 PM
Subject: Re: [Openvpn-devel] multi threading support
Hi,
Quoted 5 lines · ehsan enayati
Hi, i wanna know how does openvpn server handles multiple requests? for example if there is an active connection with a client on 1194 port and another requests from some other client comes in what will happen? Is this task managed in operating system or by openvpn itself?
OpenVPN itself (single-threaded with smart work queues).
Multi-Threading might happen in OpenVPN 3.0.
gert
Signature · 4 lines
USENET is *not* the non-clickable part of WWW! //www.muc.de/~gert/ Gert Doering - Munich, Germany [email protected]... fax: +49-89-35655025 [email protected]...
Hi,
Quoted 1 line · ehsan enayati
I saw in the linux source code that it uses fork and pthread, i think that's the way it handles multiple requests
Neither.
Fork() is used to, uh, fork other processes (for example to start scripts).
pthread is not used at all - there was some experimental code that used multithreading to get crypto into its own thread, but that has been removed for 2.3 because it wasn't complete and didn't work.
Multiple requests are just queued in a, uh, "work queue" - which is basically a glorified array of things-to-do - and then processed one after another.
gert
Signature · 4 lines
USENET is *not* the non-clickable part of WWW!
//www.muc.de/~gert/
Gert Doering - Munich, Germany [email protected]...
fax: +49-89-35655025 [email protected]...Ok now I understand what is happening, thanks for your answers guys.
________________________________
From: Gert Doering <[email protected]...>
To: ehsan enayati <[email protected]...>
Cc: Gert Doering <[email protected]...>; "[email protected]" <[email protected]>
Sent: Tuesday, September 25, 2012 11:27 AM
Subject: Re: [Openvpn-devel] multi threading support
Hi,
Quoted 1 line · ehsan enayati
I saw in the linux source code that it uses fork and pthread, i think that's the way it handles multiple requests
Neither.
Fork() is used to, uh, fork other processes (for example to start scripts).
pthread is not used at all - there was some experimental code that used multithreading to get crypto into its own thread, but that has been removed for 2.3 because it wasn't complete and didn't work.
Multiple requests are just queued in a, uh, "work queue" - which is basically a glorified array of things-to-do - and then processed one after another.
gert
Signature · 4 lines
USENET is *not* the non-clickable part of WWW! //www.muc.de/~gert/ Gert Doering - Munich, Germany [email protected]... fax: +49-89-35655025 [email protected]...