![]() | |
![]() |
| | Thread Tools | Search this Thread | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I want to write a HTTP proxy with C#, but I am unsure if it will scale; I need to handle at least 5000 simultaneous users per server. The servers can be MP with 2GB ram, that isnīt the issue. I will be filtering the http streams for keywords, so there is a processing load there. |
#3
| |||
| |||
|
|
Well - only one way to find out - try writing one and throw the tester at it -- Sriram Krishnan http://www.dotnetjunkies.com/weblog/sriram "Cablito" <cablito (AT) dontspam (DOT) com> wrote in message news:esNyvrSsEHA.904 (AT) TK2MSFTNGP11 (DOT) phx.gbl... I want to write a HTTP proxy with C#, but I am unsure if it will scale; I need to handle at least 5000 simultaneous users per server. The servers can be MP with 2GB ram, that isnīt the issue. I will be filtering the http streams for keywords, so there is a processing load there. |
#4
| |||
| |||
|
|
in a way you are absolutelly right.... but the "test" environment is an ISP client base of thousands of paying customers. No room for mistakes. "Sriram Krishnan" <ksriram (AT) NOSPAMgmx (DOT) net> escreveu na mensagem news:%23QI%23qwUsEHA.3268 (AT) TK2MSFTNGP09 (DOT) phx.gbl... Well - only one way to find out - try writing one and throw the tester at it -- Sriram Krishnan http://www.dotnetjunkies.com/weblog/sriram "Cablito" <cablito (AT) dontspam (DOT) com> wrote in message news:esNyvrSsEHA.904 (AT) TK2MSFTNGP11 (DOT) phx.gbl... I want to write a HTTP proxy with C#, but I am unsure if it will scale; I need to handle at least 5000 simultaneous users per server. The servers can be MP with 2GB ram, that isnīt the issue. I will be filtering the http streams for keywords, so there is a processing load there. |
#5
| |||
| |||
|
|
in a way you are absolutelly right.... but the "test" environment is an ISP client base of thousands of paying customers. No room for mistakes. |
#6
| |||
| |||
|
|
Naively programmed, .NET is not going to scale. There are many mistakes you can make in this process. Honestly, any language would suffer the same demise. As long as you know what you are doing, and stick to stream management operations you should be fine. Because you are going to be doing stream management, the BCL classes are not going to help you much. You can't, for instance, arbitrarily start pulling strings out of a stream (aka using encodings) because you are going to quickly run into GC problems. -- Justin Rogers DigiTec Web Consultants, LLC. Blog: http://weblogs.asp.net/justin_rogers "Cablito" <cablito (AT) dontspam (DOT) com> wrote in message news:ezfxy%23qsEHA.3600 (AT) TK2MSFTNGP10 (DOT) phx.gbl... in a way you are absolutelly right.... but the "test" environment is an ISP client base of thousands of paying customers. No room for mistakes. "Sriram Krishnan" <ksriram (AT) NOSPAMgmx (DOT) net> escreveu na mensagem news:%23QI%23qwUsEHA.3268 (AT) TK2MSFTNGP09 (DOT) phx.gbl... Well - only one way to find out - try writing one and throw the tester at it -- Sriram Krishnan http://www.dotnetjunkies.com/weblog/sriram "Cablito" <cablito (AT) dontspam (DOT) com> wrote in message news:esNyvrSsEHA.904 (AT) TK2MSFTNGP11 (DOT) phx.gbl... I want to write a HTTP proxy with C#, but I am unsure if it will scale; I need to handle at least 5000 simultaneous users per server. The servers can be MP with 2GB ram, that isnīt the issue. I will be filtering the http streams for keywords, so there is a processing load there. |
#7
| |||
| |||
|
|
Can I therefore assume the encoding classes arenīt memory efficient? No, they are fine, but you must take care. |
#8
| |||
| |||
|
|
Can I therefore assume the encoding classes arenīt memory efficient? oops, |
#9
| |||
| |||
|
|
"Cablito" <cablito (AT) dontspam (DOT) com> wrote in message news:%238QMDkrsEHA.3984 (AT) TK2MSFTNGP09 (DOT) phx.gbl... Can I therefore assume the encoding classes arenīt memory efficient? oops, The encoding classes are fine, but you must be careful. This method char[] GetChars(byte[]); Allocates a new char[] for each call. In a high-performance application, it should be avoided. Instead use this one: int GetChars(byte[], int, int, char[], int); Which requires you to supply your own char[], which you can reuse over and over. That's the kind of thing to keep in mind when asking wether .NET can handle the performance. Exactly the same issues occur with Java and C++. For high-performance applications you have to know when you are allocating new memory. All these languages make it easy to allocate memory without knowing it, and so you just need to take care. David |
#10
| |||
| |||
|
|
Also, there are NO routines for examining a character array, only a string. So even if you use the memory efficient character scanning methods you'll need to write all of your character and pattern matching from scratch. That is more of where I was heading with encodings, since most users will want the pattern matching available on either the string or regular expression classes. |
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
| |