hai nguyenhainguyen.hashnode.dev·May 20, 2024Traditional way to scaling PythonSome traditional methods to scale a Python program Threading Pros: Lightweight compared to processes Multiple threads can share memory (this can also be a downside) Cons: Python has a GIL, so it's not good for CPU-heavy tasks Sharing memory bet...scaling python
whowinwhowin.cn·Mar 9, 2024使用epoll()进行socket编程处理多客户连接的TCP服务器实例在网络编程中,当需要使用单线程处理多客户端的连接时,常使用select()或者poll()来处理,但是当并发数量非常大时,select()和poll()的性能并不好,epoll()的性能大大好于select()和poll(),在编写大并发的服务器软件时,epoll()应该是首选的方案,本文介绍epoll()在网络编程中的使用方法,本文提供了一个具体的实例,并附有完整的源代码,本文实例在 ubuntu 20.04 下编译测试完成,gcc 版本号 9.4.0。 1 基本概念 在『网络编程专栏』中...网络编程Linux
SHIKHAR YADAVshikharcode.hashnode.dev·Nov 6, 2022Optimized WebSocket Gateway For Micro-Services In GolangWebSocket is a computer communications protocol, providing full-duplex communication channels over a single TCP connection. WebSocket is distinct from HTTP. Both protocols are located at layer 7 in OSI model and depend on TCP at layer 4. The only con...176 readsepoll