Skip to content

php-service-bus/performance-comparison

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

90 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Details

Goal

This test goal is to show the difference between synchronous and asynchronous interaction. For example, DB writes are slower on weaker hardware. As a result, the worker performs less useful work while waiting for a synchronous operation result.

As a bonus, an example of the implementation of the task on golang is given

Workflow

  • Add 100.000 messages into RabbitMQ, each message is a command (represented by a peak on chart start);
  • Received command handler opens a PostgreSQL 11 transaction, inserts an entry into DB, publishes a message (event) into RabbitMQ and commits the transaction;
  • Received event does not induce any load - it is just ACKed and log message.

Conditions

  • Intel i7 8700, 16gb DDR4, SSD
  • All the logging is disabled;
  • Every application has only 1 instance (single process);
  • I haven't found how to change QoS settings in symfony/messenger so in both apps default ones are used;
  • PostgreSQL 11 (500 connections limit);
  • RabbitMQ 3.7.7;
  • PHP 7.4;
  • For php-service-bus/service-bus following PHP extensions were installed: raphf, pq, sockets, event, ext-buffer.

@see: Cooperative multitasking

Testing

The estimated execution time is indicated (considering the delay in updating the schedule).

Pure php (Time spent: ~ 4m11s)

pure

symfony/messenger (Time spent: ~ 6m55s)

symfony/messenger

php-service-bus/service-bus (Time spent: ~ 1m05s)

php-service-bus

Golang (Time spent: ~ 0m 30s)

Golang

About

This test goal is to show the difference between synchronous and asynchronous interaction

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •