java - kafka 是否适合搭建聊天或推送服务器
巴扎黑
巴扎黑 2017-04-17 13:31:34
0
3
499

kafka 典型的场景是日志场景做数据分析,但是对于聊天服务器或者推送场景这种场景有人测试过吗?

这两种场景的区别:
日志类:连接到中心服务器的终端较少并且比较固定,但是终端与服务器交换的数据量很大。
推送或聊天:连接到中心服务器的终端很多并且不固定,但是交换的数据量不大。

巴扎黑
巴扎黑

reply all(3)
迷茫

Just use traditional mq

刘奇

Why use message queue as chat server? Chatting is not done using message queues. The push server can of course use kafka as a message queue. The message queue has nothing to do with the terminal status, right

迷茫

Kafka is designed mainly for information collection and has high throughput, but the premise of its high throughput is that it uses sequential writing on the disk. It is not suitable for chat queues. If you use it for chat, each session must have a topic. However, establishing a topic in Kafka is a relatively heavy operation, and too many topics will greatly affect performance. It is better to use amqp queue for chatting.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!