Async and queue

In microservices, the queues are one of the most important things that help increase the performance and reduce the execution time.

For instance, if you have to send an e-mail to a customer when the customer finishes the registration process of your application, the application does not need to send it at that moment; it can be put in a queue to be sent a few seconds later when the server is not as busy. Also, it is async because the customer does not need to wait for the e-mail. The application will display the message Registration finished and the e-mail will be put in the queue and processed at the same time.

Another example is when you need to do very heavy workloads, so you can have a dedicated machine with better hardware to ...

Get PHP Microservices now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.