S
S
Sergey Sokolov2019-11-29 16:57:57
Nginx
Sergey Sokolov, 2019-11-29 16:57:57

Can nginx be used as an instant response buffer for outgoing POST requests from a server?

On a PHP server, an application using Seldaek/monolog for logging. Some of the events I want to send outside to the Telegram bot. For this, there is a native TelegramBotHandler (throwing an Exception if it was not possible to send), and other people's similar handlers.
For each event, an HTTP request is sent to the Telegram API server. It takes time.
What you want: configure nginx so that monolog sends requests to a local URL to nginx on the same server, where it immediately receives an unconditional fixed response “OK”. And then nginx steamed and waited, delivering the request to the real cart server. The real answer from api.telegram.orgis no longer important.
How would this be done without additional contributors besides nginx?
Is it possible to get by with modules that are standard for fresh non-commercial nginx?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vitaly Karasik, 2019-11-30
@vitaly_il1

The real response from api.telegram.org is no longer important.

In my opinion, in this case, it’s easier not to wait for a report from Telegram.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question