Low latency message queue

Basically, I have one node wizard that distributes tasks between work nodes. The number of workers may change, which means that workers cannot be hardcoded on the server side. The master sends the task to the queue, and one of the workers takes this task, processes it, and returns the result back. The most important aspect is low latency. The typical process time for a working node is about 100-300 ms, which means that the messaging system should not add a significant delay to the process time.

I am currently looking at a JMS request-response template. This means that the master sent the task to the general queue, the worker completed the task from the queue and sent the result to the next queue, which the node master listens to. The wizard will correlate the response with the request.

I am afraid that JMS may lead to a delay in the system, which is unacceptable. Perhaps I should look at other solutions? For example, RabbitMQ, JGroups or ZooKeeper?

If JMS fits here, can you recommend the fastest JMS broker? I am currently watching ActiveMQ

Another requirement for the solution is that it must work in the cloud

+4
source share
3 answers

The JMS-based solution cannot guarantee low latency due to the built-in batch processing method used by all providers, be it Rabbit or Hornet or ActiveMQ for high throughput. Vendors such as IBM and Mule have released special low-latency products for the job.

But it all depends on your workload and the number of tasks performed and the number of employees consuming. Thus, with the setting, you can get your personalized numbers.

CoralQueue, based on the LMAX break, is definitely worth a look.

+1
source

You should look here [1], Rabbitmq has a good article on performance and talk about latency.

A quick repeat, I have to say that Rabbitmq can take 400 ms lateny value in some stressful situations, but usually with a low transmission speed it is closest to 40 ms or less. Take a look (transfer rate compared to delay graphics)

By the way, you should also consider your network latency. This test shows the performance of the local host.

[1] http://www.rabbitmq.com/blog/2012/04/17/rabbitmq-performance-measurements-part-1/

0
source

I assume you are looking for a Java solution (from JMS)

For high throughput with low latency in the memory queue function, you can consider Hazelcast ( http://hazelcast.org/ )

This can happen ... It depends on how often workers leave / join the cluster. The very frequent addition / removal of cluster members will make it less efficient.

In addition, if you require persistent queues or complex queue management, this can also be problematic.

Non-java clients will be problematic since you will need to purchase a license.

However, if you just need a low latency queue for java, it will do the trick

For a quick search to see if it will fit your purpose, look here: http://docs.hazelcast.org/docs/latest/manual/html/queue.html

Make sure you have a good network configuration. 10gig, if you can, 1gig will do, but make sure you use a reliable switch.

0
source

Source: https://habr.com/ru/post/1435354/


All Articles