We encounter issues managing how the RTMP workers / threads are allocated to our application server (Weblogic).
It appeared that our server cannot see the threads allocated for the rtmp processes and after a long time the server runs out of available threads. According to Weblogic experts, it's because rtmp workers / threads use default threads on the server.
Using a Weblogic server, we can define some WorkManagers but we did not succeeded in making it work for the rtmp workers / threads.
Do you know any ways to limit the number of rtmp workers / threads allocated ?
Are there any means which could allow our Weblogic application server to manage them through its WorkManagers ?
Thank you in advance for your help.
Best regards.
Related
I am on a project with notification and messaging system between users. So, I started to learn Node.js and socket.io for real time web app. And its about to be finished. But I wanted to know how much concurrent users can socket.io handle. I would be using Amazon web services with auto scaling and elastic load balancing. And would start with m1.medium instance type, i.e vCPU = 1, ECU = 2, Memory = 3.75 GB
So, I would like to know, how much concurrent users, can it handle with only one m1.medium instance. If you could please help, would be highly grateful. Thank you!
As #reto said, it depends on multiple factors like:
your hardware configuration and resources
what you are doing/processing on the server
if your system is optimized for concurrent connections
among others.
Check the following resources for suggestion on how achieve a high amount of concurrent conections (~200k - 1M).
http://blog.caustik.com/2012/08/19/node-js-w1m-concurrent-connections/
http://blog.caustik.com/2012/04/10/node-js-w250k-concurrent-connections/
http://drewww.github.io/socket.io-benchmarking/
https://groups.google.com/forum/#!topic/socket_io/wBpq3QuR0GQ
http://blog.3rd-eden.com/post/5809079469/theoretical-node-js-real-time-performance
"Node.js is limited to a single thread". how the nodeJS will react when we are deploying in Multi-Core systems? will it boost the performance?
The JavaScript running in the Node.js V8 engine is single-threaded, but the underlying libuv multi-platform support library is multi-threaded and those threads will be distributed across the CPU cores by the operating system according to it's scheduling algorithm, so with your JavaScript application running asynchronously (and single-threaded) at the top level, you still benefit from multi-core under the covers.
As others have mentioned, the Node.js Cluster module is an excellent way to exploit multi-core for concurrency at the application (JavaScript V8) level, and since Express is cluster aware, you can have multiple worker processes executing concurrent server logic, without needing a unique listening port for each process. Impressive.
As others have mentioned, you will need Redis or equivalent to share data among the cluster worker processes. You will also want a logging facility that is cluster aware, so the cluster master and all worker processes can log to a single shared log file. The Node log4node module is a good choice here, and it works with logrotate.
Typical web examples show using the runtime detected number of cores as the number of cluster worker processes to fork, but I prefer to make that a configuration option in a config.yaml file so I can tune the number of worker processes running the main JavaScript application as needed.
Nodejs runs in one thread, but you can start multiple nodejs processes.
If you are, for example, building web server you can route every request to one of nodejs processes.
Edit: As hereandnow78 and vkurchatkin suggested, maybe the best way to use power of multi core system would be to use nodejs cluster module
cluster module is the solution.
But u need to know that, node.js cluster is, it invokes child process. It means each process cannot share the data.
To share data, u need to use Redis or other IMDG to share the data across the cluster nodes.
I have been reading a lot about Node.JS and i'm with a doubt.
NodeJS is single thread but, let's say for example, IIS it isn't also single thread?
If my server has a CPU with one core shouldn't be single thread also? I read that the number of threads are relative to the number of CPU cores.
I ask that because I also read that in IIS we have one thread by connection. Is it possible?
Thanks for reading
In a general application, the number of threads is not bound by the number of cores. IIS may have an arbitrary number of threads on a single core CPU.
Javascript, Flash, and most other web applications are single threaded by the design of the Web Browser. This does not extend to the server though.
I am wondering if you have any data on concurrent connections to websockets? I am using Socket.io on Node.js server. How many clients can connect to socket and receive data without bringing my server down? 1000? 1000.0000?
Thanks!
This highly depends on your hardware configuration, what exactly are you doing/processing on the server side and if your system is optimized for many concurrent connections. For example on Linux machine by default you would probably first hit maximum number of opened files or other limits (which can be increased) before running into hardware resources exhaustion or similar scalability issues. Key resource may be the amount of RAM which can be allocated by your node.js program to keep concurrent connections opened and ability to receive new ones.
http://blog.caustik.com/2012/08/19/node-js-w1m-concurrent-connections/
Check this blog. We use the same principle. Previously our nodejs server will crash after 100 concurrent connections due to hardware constraints. But after we move to Amazon EC2 it is now highly scalable.
We use Kentico CMS and I've exchanged emails with them about a web garden deployment.
We have a single site running on a server with 8 cpu cores. In line with Kentico's advice, we have not altered the application pool web garden setting from the default i.e. it is set to a maximum number of worker processes of 1.
Our experience is that the site only uses one of the cpu cores - the others are idling. When I emailed them about this, their response was that the OS/IIS would handle this and use other cores as necessary even though the application pool only has a single worker process.
Now, I've a lot of respect for the guys at Kentico, but this doesn't seem right to me?
Surely, if we want to use all cores, we need to permit eight worker processes (and implement session state storage in SQL server)?
Many thanks
Tony
I would suggest running perfmon for a 24 hours and see if you can determine what resources are being used. Indeed they might already be running on all cores . . . Also, if their web app is a heavily threaded system, then it will take full advantage of multiple cores(at least ours does). Threads, not worker processes, are what actually count for processor utilization.
Not sure if you got an answer on ServerFault, at any rate ASP.NET is multi-threaded and in a single worker process there are several threads, each serving a single request.