0

I'm evaluating the substitution of some http pooling features of my production application with the new JEE7 supported Websocket feature. I'm planning to use Wildfly 8 as my next production server environment and I've migrated some of my websockets compatible modules with good results on development time; but I have the doubt about how it will work on production and what performance will have the websockets implementation on a a high load enviroment.

I´ve been searching documentation about the most used JEE servers but the main manufacturers haven´t yet a production JEE7 enviroment and when they have a JEE7 version, they haven´t enought documentation about how the implementation works or some values of maximum concurrency users. In addition, some not official comments says websocket connections are associated "with a server socket" but this seems to be not very efficient.

We might assume the Websocket is used only for receive data from the client point of view and we assume each user will receive, for example, an average of 10 messages per minute with a little json serialized object (a typical model data class). My requirement is more like a stock market than a chat application, for example.

What´s the real performance can I expect for a Websockets use on production enviroment in Wildfly 8 Server, for example? Also I´m interested about some comparision with another JEE7 implementations you are acquainted with.

vferrer
  • 31
  • 7
  • I think the question is too broad. You must specify what your clients are going to do. Do they expect 10 messages per second? 100? do they only receive or also sent? A chat server and a stock market server have different scalability patterns. – vtortola May 08 '14 at 08:43
  • We might assume the Websocket is used only for receive data from the client point of view and we assume each user will receive, for example, an average of 10 messages per minute with a little json serialized object (a typical model data class). My requirement is more like a stock market than a chat application – vferrer May 08 '14 at 09:16

1 Answers1

2

Web sockets are TCP/IP based, no matter the implementation they will always use a socket (and hence an open file).

Performance wise it really depends on what you are doing, basically how many clients, how many requests/sec per client, and obviously on how big your hardware is. Undertow is based on non-blocking IO and is generally pretty fast, so it should be enough for what you need.

If you are testing lots of clients just be aware that you will hit OS based limits (definitely open files, and maybe available ports depending on your test).

Stuart Douglas
  • 847
  • 5
  • 4
  • Thanks for your answer @StuartDouglas. I think it's more or less what I supposed but I still have some doubts: the max amount of sockets will depend of the SO more than the hardware I have, it's that true?And on the other hand, you talk about "available ports depending on your test"; could you explain that? what kind of test with websockets will depend on the available ports? Thanks a lot! – vferrer May 09 '14 at 06:27
  • Ports limited only per IP address. You can use IP aliasing to remove this limitation. Or additional network cards. – mylord Sep 08 '15 at 19:32
  • "You will not hit OS limits always". If you are doing nothing on those websocket connections, you will not easily hit OS limit for few millions connections on Linux like systems. But when you start doing presence, broadcast etc real message transmission, with JSON encode/decode, you will rather hit CPU or MEM limit. – Ravi Kumar Oct 20 '16 at 17:56