@LinghaoCh · Post #794 · 23.08.2022 г., 05:05
https://nft.storage/blog/post/2022-04-29-gateways-and-gatekeepers/ nice read about running IPFS public gateway #ipfs
Hashtags
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
Пребарај: #ipfs
@LinghaoCh · Post #794 · 23.08.2022 г., 05:05
https://nft.storage/blog/post/2022-04-29-gateways-and-gatekeepers/ nice read about running IPFS public gateway #ipfs
Hashtags
@libreware · Post #1463 · 10.06.2025 г., 18:31
Quiet v5.1.2 => https://tryquiet.org/ Quiet is an alternative to team chat apps like Slack, Discord, and Element that does not require trusting a central server or running one's own. In Quiet, all data syncs directly between a team's devices over Tor with no server required. NOTE: #Quietis not audited and should not be used when privacy and security are critical. It lacks basic features and probably won't replace your Slack or Discord yet. That said, it works surprisingly well and we use it daily as a Slack replacement. => https://github.com/TryQuiet/quiet/releases/tag/%40quiet/desktop%405.1.2 => https://github.com/TryQuiet/quiet/releases/tag/%40quiet/mobile%405.1.2 via @dcntr #Tor#IPFS
@githubtrending · Post #15268 · 04.11.2025 г., 12:00
#go#blockchain#cloudvpn#golang#golang_library#holepunch#ipfs#ipfs_blockchain#kubernetes#libp2p#mesh#mesh_networks#nat#networking#p2p#p2pvpn#tunnel#vpn EdgeVPN lets you create secure, decentralized private networks using peer-to-peer (p2p) connections without relying on central servers. It can build a VPN that automatically assigns IPs, includes a small DNS server, and protects your network even if tokens leak. You can also use it as a reverse proxy to share TCP services or send files securely over p2p without a VPN connection. It works well for edge devices and development, especially behind NATs, and can be integrated into your own Go programs. This helps you connect devices easily and securely across different networks without complex setup or infrastructure. https://github.com/mudler/edgevpn