TGTGInsighttelegram intelligenceLIVE / telegram public index
← Python Заметки

TGINSIGHT SIMILAR POSTS

Најди сличен содржај

Изворен канал @pythonotes · Post #425 · 20 апр.

Недавно делал быстрый прототип асинхронного приложения в котором требовалось вызывать много синхронного кода. Да, я знаю, что это не лучший дизайн, но нужно было быстрое решение на один процесс и без очередей. Поэтому я выполнял код в потоках. Выглядело это примерно так: from fastapi.concurrency import run_in_threadpool async def execute(data: DataRequest) -> DataResponse: try: result = await run_in_threadpool(sync_function, data) return DataResponse(data=result) except Exception as e: return DataResponse( error=str(e), success=False, ) В общем работает нормально. Для всех вызовов под капотом используется общий тредпул, всё работает предсказуемо. Но потребовалось изменить количество запускаемых в пуле потоков (по умолчанию создается 40 воркеров). Так как дело происходит с FastAPI, делается это через lifespan используя настройки anyio: import anyio @asynccontextmanager async def lifespan(app: FastAPI): limiter = anyio.to_thread.current_default_thread_limiter() limiter.total_tokens = 100 yield # если вдруг нужно вернуть обратно limiter.total_tokens = 40 Зачем менять количество воркеров? - уменьшить, если оперативки мало (один тред занимает ~8мб) - увеличить чтобы выдержать нагрузку Если есть предложения получше при тех же вводных - предлагайте😉 #async

Hashtags

Резултати

Пронајдени 32 слични објави

Пребарај: #nginx

当前筛选 #nginx清除筛选
Linuxgram 🐧

@linuxgram · Post #18783 · 13.05.2026 г., 21:48

📰 Nginx 1.31 Released with HTTP Forward Proxy Support Nginx 1.31 introduces HTTP forward proxy support and addresses security vulnerabilities in HTTP/2, HTTP/3, OCSP, and core modules. 🔗 Source: https://linuxiac.com/nginx-1-31-released-with-http-forward-proxy-support/ #nginx

Hashtags

Linuxgram 🐧

@linuxgram · Post #18541 · 23.04.2026 г., 08:17

📰 Kubernetes sets a new standard for release notes, also kills Ingress NGINX Release team explains links between Version 1.36 and classic print The Great Wave off Kanagawa Kubernetes issued a new release called “Haru” on Wednesday, and the release notes and logo might be more interesting than the software.… 🔗 Source: https://go.theregister.com/feed/www.theregister.com/2026/04/23/kubernetes_1_36_haru/ #nginx

Hashtags

Linuxgram 🐧

@linuxgram · Post #18472 · 17.04.2026 г., 15:45

📰 I don't use Tailscale or Nginx to access my home lab remotely, here's what I use instead One of the most useful services to any home labber is a VPN, so that you can access your home network from anywhere and browse as if you're at home. That not only lets you use any self-hosted services you have on your NAS without having to open ports to the wider internet, but it also circumvents any geo-blocked services and nicely encrypts your data, so nobody can snoop in. 🔗 Source: https://www.xda-developers.com/i-dont-use-tailscale-or-nginx-to-access-my-home-lab-remotely-heres-what-i-use-instead/ #nginx

Hashtags

Linuxgram 🐧

@linuxgram · Post #18433 · 14.04.2026 г., 15:37

📰 Nginx 1.30 Released With Multipath TCP, ECH & More Nginx 1.30 was just released as the newest stable version of this popular web server. Nginx 1.30 incorporates all of the changes from the Nginx 1.29.x mainline branch to provide a lot of new functionality like Multipath TCP (MPTCP)... 🔗 Source: https://www.phoronix.com/news/Nginx-1.30-Released #nginx

Hashtags

Linuxgram 🐧

@linuxgram · Post #18231 · 29.03.2026 г., 11:48

📰 Nginx 1.29.7 Delivers Multipath TCP Support Released this week was Nginx 1.29.7 as the newest mainline version of this HTTP(S) web server. Releasing alongside Nginx 1.28.3 stable, it fixed buffer overflow vulnerabilities and some other vulnerabilities. Making Nginx 1.29.7 more exciting though is that it landed Multipath TCP support... 🔗 Source: https://www.phoronix.com/news/Nginx-1.29.7-Multipath-TCP #nginx

Hashtags

Linuxgram 🐧

@linuxgram · Post #17812 · 17.02.2026 г., 19:12

📰Nginx Proxy Manager 2.14 Drops armv7 Support Nginx Proxy Manager 2.14 removes armv7/armhf builds and introduces a new setting for advanced proxy configurations. 🔗 Source: https://linuxiac.com/nginx-proxy-manager-2-14-drops-armv7-support/ #nginx

Hashtags

OKHK 👀

@iokhk · Post #9828 · 14.05.2026 г., 03:18

🔴 NGINX http_rewrite 模块漏洞;或会导致堆溢出甚至远程代码执行。 - 漏洞的起因是 nginx 尝试将 escape 过的 URL 写入未 escape 长度的内存。 - 在 ASLR 未被开启的情况下,可以导致远程代码执行。 - 修复已于 1.30.1/1.31.0 发布。 1. https://depthfirst.com/nginx-rift 2. my.f5.com/~ CVE: CVE-2026-42945 CVSS: 9.2 (F5 Networks) Affect: [0.6.27, 1.30.0] Fixed-At: 1.30.1, 1.31.0 #nginx

Hashtags

infosecurity

@tg_infosec · Post #3279 · 10.06.2025 г., 12:33

👩‍💻 Attacking Nginx. • Nginx — это веб-сервер, на котором работает треть всех сайтов в мире. Но если забыть или проигнорировать некоторые ошибки в настройках, можно стать отличной мишенью для атакующих: • Missing Root Location in Nginx Configuration: - Explanation; - The Missing Root Location Issue. • Attack Scenario: Exploiting the Missing Root Location: - Mitigating the Risk. • Unsafe Path Restriction in Nginx: - Explanation; - Potential Bypass Techniques; - Attack Scenario: Exploiting Path Restriction Bypass; - Mitigation Strategies. • Unsafe variable use / HTTP Request Splitting: - Unsafe Use of Variables: $uri and $document_uri; - Regex Vulnerabilities; - Safe Configuration; - Attack Scenarios and Detection Techniques; - CRLF Injection and HTTP Request Splitting; - Bypassing Path Restrictions Using Encoded Characters; - Examples of Vulnerable Configurations. • Raw Backend Response Reading: - Example Scenario: Exposing Raw Backend Responses; - Example uWSGI Application; - Nginx Configuration; - Example Invalid HTTP Request; - Example Output for Invalid Request; - Attack Scenario; - Mitigation Strategies. • merge_slashes set to off: - merge_slashes Directive; - Malicious Response Headers; - map Directive Default Value; - DNS Spoofing Vulnerability; - proxy_pass and internal Directives. • proxy_set_header Upgrade & Connection: - Vulnerable Configuration; - Vulnerability; - Attack Scenario; - Mitigation; - Additional Attack Scenarios and Commands. #Nginx

Hashtags

简悦🥑

@Xiangyues · Post #530 · 31.07.2022 г., 03:41

✨Nginx官方最新稳定版 官方源: http://nginx.org/en/linux_packages.html 官方docker: https://hub.docker.com/_/nginx 🏷 TAG #nginx#网站 📢 Channel @xiangyues 👥 Eren's Group @everyue

djangoproject

@djangoproject · Post #337 · 09.05.2017 г., 08:28

http://blog.povilasb.com/posts/python-asyncio-vs-nginx-performance/ While I was playing with Python #asyncio I got interested in how well it performs serving data over TLS compared to #Nginx. So I implemented a small HTTPS server with asyncio:

infosecurity

@tg_infosec · Post #2750 · 07.12.2024 г., 08:29

👩‍💻 Nginx Path Configuration Pitfalls. • Nginx — это веб-сервер, на котором работает треть всех сайтов в мире. Но если забыть или проигнорировать некоторые ошибки в настройках, можно стать отличной мишенью для атакующих. Благодаря этому материалу, можно понять какие ошибки в конфигурациях встречаются чаще всего и как их исправить. Attacks: • Nginx Configuration Vulnerability; • Exploiting Trailing Slash Misconfiguration; • Exploiting Parent Directory Access; • Impact Without Trailing Slash on Alias; • Combined Impact. Defend Against Attacks: • Update Nginx; • Configuration Check; • Use Configuration Management; • Security Headers; • Access Control; • Directory Listing; • Alias Traversal Protection; • HTTP to HTTPS Redirect; • SSL Configuration; • Rate Limiting; • Connection Limits; • Custom Error Pages; • Gzip Compression; • Client-Side Caching; • HTTP2 Protocol; • Secure File Permissions; • Web Application Firewall (WAF); • Monitoring and Logging; • SSH Hardening; • Firewall Configuration; • Two-Factor Authentication; • Regular Backups; • Deny Hidden Files; • IP Whitelisting; • Disable Unused Modules; • Use Trailing Slash in Alias Directives; • Regular Expression Matching; • Implement Strict Location Paths. #Nginx#devsecops

ПретходнаСтраница 1 од 3Следна