I'd like some help understanding the use of pheanstalk (php beanstalk client). I have a PHP program that is executed on the server when form data is sent to it. The PHP program should then package the form data as a JSON structure and send it to a backend server process.
私が理解していないのは、beanstalkd サーバーへの接続です。PHP プログラムが実行されるたびに新しい Pheanstalk() オブジェクトを作成する必要がありますか? その場合、接続を作成するコストが発生します。接続が閉じられるのはいつですか (pheanstalk には close() メソッドがないため)?
接続が永続的である場合、それは PHP プログラムのすべての実行間で共有されますか? その場合、同時ヒットの場合はどうなりますか? 助けてくれてありがとう。