The long sending delay is caused by the PHP language feature.

The PHP client reinitializes a KafkaProducer object each time it sends a message. The initialization involves various operations, such as connecting to each broker and updating metadata. The sending delay is greater than 100 ms in a VPC and 500 ms on the Internet. In contrast, a Java client re-uses KafkaProducer and has a low sending delay.