home.social

#wsgi — Public Fediverse posts

Live and recent posts from across the Fediverse tagged #wsgi, aggregated by home.social.

  1. Отказоустойчивый запуск WSGI приложения. Обзор архитектуры Gunicorn

    Gunicorn кажется простым, пока не сталкиваешься с эксплуатацией: внезапные ошибки 502, зависшие воркеры и странное поведение при перезапусках. За этими симптомами стоят вполне конкретные причины — от медленных клиентов и отсутствия буферизации до особенностей реализации GThread и механики Graceful Shutdown. В этой статье разберём реальные сценарии отказов, посмотрим, как менялась архитектура GThread в разных версиях Gunicorn, и соберём практичную конфигурацию с Nginx, Docker и Kubernetes, которая ведёт себя предсказуемо под нагрузкой.

    habr.com/ru/companies/domclick

    #python #gunicorn #wsgi #prefork #gthread #graceful_shutdown #keepalive #nginx #docker

  2. Отказоустойчивый запуск WSGI приложения. Обзор архитектуры Gunicorn

    Gunicorn кажется простым, пока не сталкиваешься с эксплуатацией: внезапные ошибки 502, зависшие воркеры и странное поведение при перезапусках. За этими симптомами стоят вполне конкретные причины — от медленных клиентов и отсутствия буферизации до особенностей реализации GThread и механики Graceful Shutdown. В этой статье разберём реальные сценарии отказов, посмотрим, как менялась архитектура GThread в разных версиях Gunicorn, и соберём практичную конфигурацию с Nginx, Docker и Kubernetes, которая ведёт себя предсказуемо под нагрузкой.

    habr.com/ru/companies/domclick

    #python #gunicorn #wsgi #prefork #gthread #graceful_shutdown #keepalive #nginx #docker

  3. От WSGI к ASGI: как Python научился работать с асинхронным вебом

    WSGI и ASGI — то, на чем стоит весь современный веб на Python. Это стандарты, которые описывают интерфейс между веб-сервером и приложением. Благодаря им сервер и фреймворк не образуют жесткую пару: любой WSGI-сервер запускает любое WSGI-приложение, любой ASGI-сервер любое ASGI-приложение. Uvicorn не знает ничего о FastAPI, FastAPI не знает ничего о Uvicorn, они знают только о том, что передать на вход и что ожидать на выходе. Разберем, как все это устроено. Погружаемся

    habr.com/ru/articles/1003282/

    #python #asgi #wsgi #вебсервер #asyncio #starlette #uvicorn

  4. [Перевод] Python 3.14 без GIL: что это значит для веб-разработки

    Команда Python for Devs подготовила перевод статьи о том, как "free-threaded" Python меняет правила игры для веб-сервисов. Автор сравнивает Python 3.14 с GIL и без него на реальных ASGI и WSGI приложениях — и приходит к неожиданному выводу: несмотря на локальные просадки в производительности, "free-threaded" Python уже сейчас может упростить масштабирование и снизить накладные расходы.

    habr.com/ru/articles/967244/

    #Python #GIL #freethreading #вебсервисы #ASGI #WSGI #производительность #конкурентность #Granian #FastAPI

  5. Обзор WSGI, ASGI и RSGI: лидеры среди веб-серверов в 2025 году

    Любому веб-приложению нужен веб-сервер для доступа извне. На самом деле, многие даже не уделяют выбору веб-сервера для своего приложения достаточного внимания: на Django берут "популярный" Gunicorn (а кто-то ещё и обвязывает его Uvicorn'ом), а для FastAPI Uvicorn практически стандарт. Тут "на сцену" выходит Granian, представляющий впечатляющие результаты производительности с простой настройкой. В своём проекте "Код на салфетке" я использовал uWSGI, но недавно узнал про новый Granian и мне стало интересно на что он способен. Так появилась идея для этой статьи. В этой статье узнаем:

    habr.com/ru/articles/948190/

    #WSGI #ASGI #RSGI #вебсервер_python #сравнение_веб_серверов #django #fastapi #uvicorn #granian

  6. Na toll. #Python #wsgi wandelt UTF-8-Kodierte QUERY_STRINGS nochmal in UTF-8 um. Grr.

  7. Built a Python library to enable HTTP method override through form parameters or headers — supports PUT, DELETE, PATCH, and more.

    github.com/marcuxyz/wsgi_metho

    #python #wsgi #http #flask #fastapi #django

  8. I feel like I'm so close to the finish line, by not using mod-wsgi that was packaged by the distro, in this case Alpine, and instead use #mod_wsgi from #pip.

    I don't get the
    segfault core dumped error anymore, which is a huge relief cos that was annoying to debug, but I can't serve my pages yet either. I got this error instead:

    Truncated or oversized response headers received from daemon process 'localhost': /base/base/wsgi.py

    I almost feel like
    #WSGI (or #Apache) wasn't made for #Alpine in the first place considering it's absent in both docs :)))

  9. My final boss in solving this #Django on #Alpine container thing is getting #Apache/#WSGI (mod_wsgi) working. My container runs Apache fine, I suppose, if I don't supply it any site config - but once I do (i.e. in /etc/apache2/conf.d), I'm getting Segmentation fault core dumped errors and reboots.

    I'm assuming, as far as my config goes, I need to point
    python-home to where my #virtualenv is, in addition to python-path to where my Django site/app is (like I do on #Ubuntu since that does not enforce the use of venv yet). But that doesn't seem to be enough, so again, in addition to apache2, apache2-mod-wsgi, and apache2-utils (and perhaps musl-dev and gcc in runtime other than just during build), what am I missing?

  10. @doctorwhom

    Oh, and if ASGI is overkill for your application - don't need high-performance async stuff - WSGI, which it is based on, is even easier to write scripts for.

    #WSGI #ASGI

  11. Working on the slides for this evening's talk at the Python Pescara @pescara meetup, I found the commit in which Adrian Holovaty @adrian added WSGI support to Django way back in 2005. ⏳

    Mind-blowing 🤯
    github.com/django/django/commi

  12. You can now easily change the WSGI server for Lumos. You can choose between Gevent WSGI and Flask.run().

    github.com/Wervice/Lumos

  13. So here's another pretty solid resource explicitly stating that WSGI URL routing treating %2F like / is unexpected.

    Source: w3.org/Addressing/URL/4_URI_Re

    #python #wsgi #fastapi #flask #web #framework

  14. I'll be using #gnunicorn as my #WSGI server. So I'll have to read through the documentation for it. peps.python.org/pep-3333/

  15. As I explained on my #Twitter feed, when exploring new markets or technologies, I find it useful to build small prototypes. We were hoping to eschew the use of #frameworks for our next project, and I was wondering if it would make sense to ditch our default #backendframework of choice: #Flask. To do that I'm going to have to build an app that directly uses #WSGI. So for my first prototype, Ithought I'd build a little prototype website to showcase all our little prototype.

  16. I found this on the Internet. Is a middleware for Django (and Flask, and other generic WSGI python apps) which allows you to serve your static files directly from WSGI and Django, instead of configuring a CDN out of the box.

    Not sure if is a great idea for big projects but seems cool for small ones who doesn't expect too much traffic.

    whitenoise.readthedocs.io/en/l

    #django #python #wsgi

  17. Just spent an hour fighting and because an app was missing config information.

    Turns out it needs to be actually included in the config file to...you know...use it.

    All is well. I'll do SSL tomorrow.