mark icon indicating copy to clipboard operation
mark copied to clipboard

reduced speed when running a server with openresty

Open MrSipping opened this issue 3 years ago • 2 comments

Hi, doing direct benchmarks on the machine with Mark the speed is remarkable, but if I pass my connection through an api gateway with openresty doing the benchmark the speed drops a lot and I would like to understand how to improve it.

MrSipping avatar Dec 29 '22 10:12 MrSipping

How is the configuration in your Nginx ?

Without a proper Proxy configuration, the performance will be poor with Mark or with any other app.

joanhey avatar Apr 26 '23 08:04 joanhey

it'd help to know more about how you are running this.

You can just create a simple Dockerfile base image:

FROM php:8.4-cli

RUN docker-php-ext-install sockets pcntl

RUN apt-get update && apt-get install -y libevent-dev libssl-dev -y && pecl install event

and then copy your code over, expose your port, and run the start -d command in your own Dockerfile that inherits this as the base.

Then if you're running straight Docker "in prod", you'll need to do some ulimit and kernel tuning: https://manual.workerman.net/doc/en/appendices/kernel-optimization.html

If you use docker compose or k8s or something you can add those configuration options to either your docker-compose file or your k8s resources.

Andrewpk avatar Dec 08 '24 00:12 Andrewpk