Network I/O operations in user code should only be done through the Nginx Lua API calls as the Nginx event loop may be blocked and performance drop off dramatically otherwise. Disk operations with relatively small amount of data can be done using the standard Lua io library but huge file reading and writing should be avoided wherever possible as they may block the Nginx process significantly. Delegating all network and disk I/O operations to Nginx's subrequests (via the ngx.location.capture method and similar) is strongly recommended for maximum performance.
相关文章
- 如何用Delphi开发网游外挂
- 如何使用Python读写txt文件
- PyCharm环境管理指南:如何删除虚拟环境及清空指定库
- 如何解决eclipse上的Android程序“Please ensure that adb is correctly located at 'D:\eclipse\sdk\platform-tools\adb.exe' and can be executed.”小问题?
- 如何下载视频号的视频文件?
- 如何下载微信视频号上的视频(另类思路)
- Linux服务器如何后台运行程序及查看进程?
- List使用Stream 分组求和groupingBy, collect、reduce方法流数据处理
- Solidworks如何替换工程图参考零件
- 如何选择与相机相匹配的镜头以达到最佳成像性能