Question
Joe Brun · 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?
 

47
4 0 9 424

Replies

For any new project based on IRIS, I would recommend, to have all the application logic outside of InterSystems IRIS, and use it only as a database. For instance with NodeJS Native API

No brainer I wouldn't recommend using Cache for web applications and there are problems that you mention.
For example Node.JS will do application part a lot better.
Use Cache only for database if you are not satisfied with other databases.
If you use Cache for application you should use ECP to distribute the load.
But you will suffer licensing and logic problems.

I recommend InterSystems IRIS REST API backend with any js framework frontend.

10 000 simulatenous clients are easily achievable. I know of InterSystems IRIS based applications in productions with even higher number of concurrent users.

I know of InterSystems IRIS based applications in productions with even higher number of concurrent users.

Can you share some technical details? Architecture of applications? Is it web applications?

For some reason Robert's comments have disappeared from this topic. Moderation regime?

I think he just deleted his reply. We have a moderation regime on Developer Community too, of course) Moderator's team registers and blocks spam attempts every day.

Correct.
After 20 years working with CSP since day 2.5 I just don't feel like discussing and explaining CSP internals anymore and argue against obviously wrong statements. 
There is enough public detailed documentation around .

Can you share some technical details?

One of the projects:

  • 1 Mirrored Data server
  • 4 Non-mirrored App Servers

They run Apache web servers.

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...