Internet java interview Collection

1. Why use Message Queue ah?

 

  Answer:

The core functions of the message queue is: decoupling, asynchronous traffic clipping
decoupling: send interface calls, that if E systems have this information? If the C system that now do not need it? A second system now have to send data out? A system is responsible for people on the verge of collapse. . .
Some more crashes more thing, A system should always consider if the system hung up BCDE four supposed to? I do not want to resend? Shall I save up the message? White hair ah. . .
-------------------------------------------------- -------------------------------------------------- ------
asynchronous: a system receives a request, it is necessary to write in their local library, the library also need to write the three systems in the BCD, write your own local library to 3ms, BCD three systems were written libraries to 300ms, 450ms, 200ms.
The final request total delay is 3 + 300 + 450 + 200 = 953ms, close to the 1s, the user feels put forward something, slow dead slow death.
-------------------------------------------------- -------------------------------------------------- -----
clipping: 0:00 to 11:00 every day, A calm system, the number of concurrent requests per second to 100. The results of each 1 to 11 o'clock to 1:00, the number of concurrent requests per second suddenly surge to 10,000.
But the system has a maximum processing capacity can only be processed 1000 requests per second ah. . . Embarrassing, the system will die. . .
-------------------------------------------------- -------------------------------------------------- ----------

2. Message Queue What are the advantages and disadvantages ah?

  answer:

3.kafka, activemq, rabbitmq, rocketmq what's the difference and what scenarios fit?

  answer:

Guess you like

Origin www.cnblogs.com/q1359720840/p/11027036.html