This is preferred usage. Closing the socket after each reply is wasteful.Wietse
Thanks for the answer. Comments from Jan P. Kessler helped also.I've updated my code to keep connections opened unless a configurable timeout. According my tests, I've new data:
- GreyLSE is now rated at 150000 SQL requests/second, to speak only of the SQL part. - The global process from the acceptance of a postfix request to the delivery of the policy decision is now rated at around 15000 req/s.
I see my processing childs dying after having processed 100 postfix requests, for the ones not dying because of the timeout.
So the database is not the bottleneck. I now think the bottleneck is simply the latency needed for network communication, and postfix delegation protocol handling.
The average number of bytes transferred for every postfix request is 600 bytes. 600 bytes x 15000 requests/s = 8.58 Mbytes/s. That's the theorical speed of a 100 Mbits/s line. (more or less)
I think that "je tiens le bon bout!" :)
<<attachment: hahnn.vcf>>