question

Upvotes
Accepted
36 4 3 14

Is batchSize and flushTimerInterval helpful to improve the latency?

Greetings all

Currently, we found our app has latency issue when message input rate to be around 60,000-80,000 per second, is there any way to improve this?

We have removed as much unnecessary code as possible from the processEvent, but seems not enough.

Is some change in configuration would help? Like batchSize and flushTimerInterval? Frankly speaking I've tested these two config items in my environment but still have no clue what this functionality supposed to work.

Any suggestion would be much appreciated!

BR.

treprfarfa-apilatency
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

Upvotes
Accepted
14.3k 23 8 12

@Leon.Hong

The application improve the performance by using the horizontal scaling to distribute the process of response/update messages between multiple CPU cores while running a single process on the machine. This would increase the response message throughput of the application.

With horizontal scaling concept, the application can have many sessions and having its own connection to the infra e.g. 4 sessions with 4 connections. The number of items subscribed per session should be equally distributed, i.e. total number of items divided by 4. This will reduce the update rates per channel and increase TCP Buffer Sizes according to number of connections.

Below is the example design of the application applied horizontal scaling with 4 sessions/connections:

Please be informed that the horizontal scaling may not be fully beneficial to applications when the number of threads is higher than the number of the machine CPU’s cores. For example, with 7-sessions-and-7-connections, there will be seven RFA threads (session-connection) and seven application threads (for event processing) when the merged thread model (sharedConnections = false) is used. Ideally, these 16 threads (7 RFAs + 7 applications) should be distributed among 16 CPU cores to be fully efficient.

For more detail of horizontal scaling, please refer to section 14.5.6 Horizontal Scaling in the RFA Developer Guide document (<RFA Package>\Docs).


diagram2.jpg (34.5 KiB)
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.