IIS performance issue trying to implement XMPP-like protocol

we have a client who needs to receive interactive messages from the server, from clients that are distributed around the world for all types of firewalls, while all types of ports are closed. The only thing we can rely on is HTTP port 80 (and HTTPS 443).

The design is mainly modeled after XMPP (Jabber protocol) using our client and IIS. The client sends GET requests to the .NET handler; the handler keeps the request open for searching messages. If any messages arrive, they are immediately sent to the client; if not, then after a timeout the connection closes with the answer "no data". The client immediately opens the message.

Well, theoretically.

What actually happens in the first place, IIS cannot process more than 100 simultaneous requests - the rest are all queued, and there may be a few minute lag between the “connected” and IIS, which recognize that the client has called. Secondly, about half the time when the client leaves the server without an answer (the client has five minutes longer than the server).

POST always works. Other data served on the same web server works. Web services on a single server are running. This is a ready installation on a Windows 2K3 server.

Is there a configuration parameter that we are missing, or is there something else I should pay attention to?

Thank.

+3
source share
4 answers

, ASP.NET, IIS. HTTP- (IHttpAsyncHandler), /, ( ).

: , : CodeProject: COMET ASP.NET

+3

IIS , -, Apache ( Mod_mono) LightTPD.

, XMPP HTTP, XMPP Over BOSH. .

+1

, tweeking. asp.net . :

, Windows 2k8.

  • reg add HKLM\System\CurrentControlSet\Services\HTTP\Parameters/v MaxConnections/t REG_DWORD/d 1000000/f
  • reg HKLM\System\CurrentControlSet\Services\TcpIp\Parameters/v TcpTimedWaitDelay/t REG_DWORD/d 30/f
  • reg add HKLM\SOFTWARE\Microsoft\ASP.NET\2.0.50727.0/v MaxConcurrentThreadsPerCPU/t REG_DWORD/d 0/f
  • reg HKLM\SOFTWARE\Microsoft\ASP.NET\2.0.50727.0/v MaxConcurrentRequestsPerCPU/t REG_DWORD/d 30000/f
  • appcmd.exe set apppool "[ ]" /queueLength: 65535
  • appcmd.exe set config/section: serverRuntime/appConcurrentRequestLimit: 100000
  • reg add HKLM\System\CurrentControlSet\Services\TcpIp\Parameters/v MaxUserPort/t REG_DWORD/d 65534/f
  • reg add HKLM\System\CurrentControlSet\Services\TcpIp\Parameters/v MaxFreeTcbs/t REG_DWORD/d 2000/f
  • reg HKLM\System\CurrentControlSet\Services\TcpIp\/v MaxHashTableSize/t REG_DWORD/d 2048/f reg add HKLM\System\CurrentControlSet\Services\InetInfo\/v MaxPoolThreads/t REG_DWORD/d 80/f
  • appcmd set config/section: processModel/requestQueueLimit: 100000/commit: MACHINE

, , 30 000 5k . , , .

+1

XMPP has never been developed for high-performance applications. Messages must go through the entire stack to the application level, and there is a lot of XML parsing. Did you think you were using a standard other than XMPP?

0
source

Source: https://habr.com/ru/post/1697412/


All Articles