Take a look at the log message queue website traffic analysis system

A message queue Comparative

1.RabbitMQ

  ①RabbitMQ using Erlang language written an open source message queue

  ② itself supports many protocols: AMQP, XMPP, SMTP, STOMP, because of this, it is very heavyweight, is more suitable for enterprise-class development

  ② to achieve a Broker architecture, which means that the message is queued in the first queue at the center sent to the client. Routing, load balancing or data persistence have very good support.

  ③ distributed

2.Redis

  ①Redis is based on the key-value NoSQL database development and maintenance is very active

  ② Although it is a Key-Value database storage system, but it does support the MQ function, it can serve as a lightweight queue to use

3.ZeroMQ

  ①ZeroMQ known as the fastest message queuing systems, in particular the demand for high throughput scenarios

  ②ZeroMQ can provide for advanced / complex RabbitMQ queue are not good, but developers need their own combination of technologies framework, the technical complexity of this MQ is able to apply successfully challenges.

  ③ZeroMQ provide only non-persistent queues, that if downtime, data will be lost, which, Twitter's Storm 0.9 defaults to using the previous version ZeroMQ as a transport data stream (Storm support from version 0.9 start at the same time as ZeroMQ and Netty transmission module)

4.ActiveMQ

  ①ActiveMQ is a subproject of Apache

  ② similar ZeroMQ, it enables the agent and queue to peer technology

  ③ similar RabbitMQ, a small amount of code that can be efficiently implemented scenarios.

5.Kafka

  ①Kafka is a subproject of Apache

  ② The Scala language, it horizontally scalable and high throughput is widely used.

  Used to transfer data between the zero-copy ③Kafka

  ④ fully distributed systems, Broker, Producer, Consumer automatic support for distributed are native, automatic load balancing

  ⑤ high throughput, on a common server throughput rate can be achieved 10W / s of

  ⑥ fast persistence, the message may be persistent in O (1) overhead

  ⑦ supports Hadoop data loaded in parallel, the same as for off-line analysis of log data and Hadoop system, but the restrictions but also requires real-time processing, this is a viable option. Kafka through parallel loading mechanism of Hadoop unified message processing online and offline.

  Here it is applied to a blogger's blog: Web logs traffic analysis system

Second, the use of message queues

1.RabbitMQ installation and use

 

1. asynchronous processing

To a scene  

 1.messaging

  ① For some conventional messaging system, kafka is a good choice, partions / replication and fault tolerance, you can make kafka has good scalability and performance advantages

  ②kafka did not provide a "transactional" JMS in "messaging guarantee (message acknowledgment.)" And other enterprise-level features; kafka can only be used as a "normal" messaging system, to a certain extent, yet make sure to send a message to the absolutely reliable reception (for example, message retransmission message transmission loss, etc.)

2.Website activity tracking

  ①kafka as the best tool "Web site activity tracking", can send information page / user to kafka in operation, and real-time monitoring, or off-line

Guess you like

Origin www.cnblogs.com/rmxd/p/11583002.html