Skip to content

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

License

Notifications You must be signed in to change notification settings

kopaygorodsky/performance-comparison

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

71 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Details

Goal

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

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.

Conditions

  • Intel i7 8700, 16gb DDR4, SSD
  • All the logging is disabled;
  • Every application has only 1 instance (single process);
  • I did not 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.3;
  • For php-service-bus/service-bus following PHP extensions were installed: raphf, pq, sockets, event, ext-buffer.

MpS - messages per second

@see: Cooperative multitasking

Testing

symfony/messenger (Time spent: ~ 1m45s)

symfony/messenger

php-service-bus/service-bus (Time spent: ~ 50s)

symfony/messenger

Golang (Time spent: ~ 20s)

symfony/messenger

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

Languages

  • PHP 68.7%
  • Go 17.4%
  • Dockerfile 12.7%
  • Shell 1.2%