Question
· Nov 26, 2020

10000 clients simultaneously

How InterSystems solutions handle C10k connections? ( https://en.wikipedia.org/wiki/C10k_problem )
For example, I want to create a social network on InterSystems platform.
In the scenario client (browser) => CSP Gateway => Cache can the Cache handle a large number of clients at the same time?
Quick analysis shows that CSP Gateway for each request opens a new TCP connection to Cache SuperServer (port 1972) allocating CSP session and license slot.
SuperServer has no queues or pools, and TCP connections are expensive (in terms of system resources).

Is there any real-world projects or tests/results?
 

Discussion (9)3
Log in or sign up to continue

I would add that it is worth remembering that you're not limited to using the technologies built-in to IRIS (or Cache for that matter).  There are also proven Open Source alternatives available for building web applications that use IRIS/Cache as a back-end environment (or simply an ultra-high-performance database).  So, if you want to develop applications in JavaScript/Node.js and use IRIS as a persistent JavaScript Object store, QEWD should be on your list.  Alternatively, check out mg_web and mgweb-server as an alternative to the built-in REST solution.  For more info see:

https://github.com/chrisemunt?tab=repositories

https://github.com/robtweed?tab=repositories

https://github.com/robtweed/qewd-conduit/blob/master/IRIS-windows.md

"Quick analysis shows that CSP Gateway for each request opens a new TCP connection to Cache SuperServer (port 1972) allocating CSP session and license slot."

That is not true.

  • Web Gateway (fka CSP Gateway) has pool of connections that it uses to handle incoming requests. If all existing connections are busy and its number is less than "Maximum Server Connections" [0] then Web Gateway indeed creates new connection. And keeps it in the pool of available connections until this connection is not used for "No Activity Timeout".

  • Each new HTTP request does not allocate CSP session. If the request identifies itself as a part of already existing session (via cookie or other means) then the CSP session is not created. Also, if this is a request to the REST or SOAP Service that has sessions disabled then session is not created.

  • Each new HTTP request does not allocate license unit. HTTP requests for existing sessions use the same license unit. HTTP requests for new sessions usually do allocate the license unit.

"SuperServer has no queues or pools"

  • It's possible to configure SuperServer to have pool of processes to be ready to handle incoming TCP connections [1]

[0] https://docs.intersystems.com/irislatest/csp/docbook/Doc.View.cls?KEY=GC...
[1] https://docs.intersystems.com/irislatest/csp/docbook/DocBook.UI.Page.cls...