Robyn icon indicating copy to clipboard operation
Robyn copied to clipboard

--fast flag inspired by sanic framework

Open tushar5526 opened this issue 1 year ago • 7 comments

Sanic has its own webserver along with support for external webservers. Servers like uvicorn, gunicorn leave it up to the users to tweak the value of processes, workers or threads to find the best combination which gives the best performance.

But Sanic's own webserver has a --fast flag which automatically optimises these values according to your server. Robyn should support something like it to tweak the values of processes and workers.

tushar5526 avatar Oct 08 '23 15:10 tushar5526

Hey @tushar5526 👋

That is a great idea. Thank you. I will have a look 😄

sansyrox avatar Oct 13 '23 19:10 sansyrox

Currently encountering high concurrency issues, please as soon as possible @sansyrox thank you

mn3711698 avatar Nov 30 '23 18:11 mn3711698

Hey @mn3711698 👋

Can you please explain a bit more ? What do you mean by this

Currently encountering high concurrency issues, please as soon as possible

How are you running Robyn?

sansyrox avatar Nov 30 '23 23:11 sansyrox

@sansyrox

i know just lite english. my website running Robyn.

[program:ro19] environment =PYTHONPATH=/var/vcom/,LANG=zh_CN.UTF-8,LC_CTYPE=zh_CN.UTF-8,LC_ALL=zh_CN.UTF-8 directory = /var/vcom/ command = /usr/local/bin/python3 ./run_apiro19.py --workers 5 autostart = true autorestart=true user = root redirect_stderr = true stdout_logfile = /var/log/ro19.log

[program:ro20] environment =PYTHONPATH=/var/vcom/,LANG=zh_CN.UTF-8,LC_CTYPE=zh_CN.UTF-8,LC_ALL=zh_CN.UTF-8 directory = /var/vcom/ command = /usr/local/bin/python3 ./run_apiro20.py --workers 5 autostart = true autorestart=true user = root redirect_stderr = true stdout_logfile = /var/log/ro20.log

[program:ro21] environment =PYTHONPATH=/var/vcom/,LANG=zh_CN.UTF-8,LC_CTYPE=zh_CN.UTF-8,LC_ALL=zh_CN.UTF-8 directory = /var/vcom/ command = /usr/local/bin/python3 ./run_apiro21.py --workers 5 autostart = true autorestart=true user = root redirect_stderr = true stdout_logfile = /var/log/ro21.log

Robyn should support something like it to tweak the values of processes and workers ?

mn3711698 avatar Dec 04 '23 16:12 mn3711698

Hey @mn3711698 👋

It is super easy to do that in Robyn 😄

Just do python3 app.py --workers=N --processes=M

sansyrox avatar Dec 04 '23 22:12 sansyrox

https://robyn.tech/documentation/api_reference/const_requests#muli-core-scaling

sansyrox avatar Dec 04 '23 22:12 sansyrox

Also, @mn3711698 , I would love to see your website 😄 You can share it with me on Discord if that is more comfortable.

sansyrox avatar Dec 04 '23 22:12 sansyrox