阿里云文档 2025-10-22

如何通过Nginx Ingress配置WebSocket服务

对于依赖WebSocket长连接的实时应用,为避免Nginx Ingress默认超时导致连接中断,可通过配置超时注解保证连接稳定。

文章 2023-11-16 来自:开发者社区

Nginx实现websocket代理的方式

一个简单的实现,后续再补充。其中80端口是提供正常web访问的端口,9000是提供socket服务的端口。实际部署时出于安全考虑,可以将代理端口与后端服务器提供的端口设置为不同的值。 基于此配置也可以方便地配置负载均衡。upstream test.com { server 192.168.56.108:80; server 192.168.56.109:80; keepa...

文章 2023-05-23 来自:开发者社区

「应用中间件」使用NGINX作为WebSocket代理

WebSocket协议提供了一种创建支持客户端和服务器之间实时双向通信的web应用程序的方法。作为HTML5的一部分,WebSocket使开发这些类型的应用程序比以前可用的方法容易得多。大多数现代浏览器都支持WebSocket,包括Chrome、Firefox、Internet Explorer、Opera和Safari,现在越来越多的服务器应用程序框架也支持WebSocket。对于需要多个We....

「应用中间件」使用NGINX作为WebSocket代理
文章 2017-11-13 来自:开发者社区

nginx websocket 代理

websocket在线测试:http://www.blue-zero.com/WebSocket/,可以使用这个工具测试: 需求:大数据项目开开放2个端口8080和7398,一个走http协议,一个走tcp,也就是访问socket。当client访问这个项目socket会把client的信息抛出到web页面。现在要用nginx做代理,把这2个端口映射到内网,提供内网访问。 nginx代理h...

本页面内关键词为智能算法引擎基于机器学习所生成,如有任何问题,可在页面下方点击"联系我们"与我们沟通。

产品推荐

{"cardStyle":"productCardStyle","productCode":"aliyun","productCardInfo":{"productTitle":"部署Nginx并通过Ingress暴露和监控服务","productDescription":"在阿里云容器服务(后简称ACK)集群中通过YAML文件快速部署一个Nginx应用并通过Nginx Ingress暴露和监控服务,结合使用ACK、日志服务、专有网络搭建业务部署运维方案。","productContentLink":"https://www.aliyun.com/solution/tech-solution/nginx_ingress","isDisplayProductIcon":true,"productButton1":{"productButtonText":"方案详情","productButtonLink":"https://www.aliyun.com/solution/tech-solution/nginx_ingress"},"productButton2":{"productButtonText":"一键部署","productButtonLink":"https://help.aliyun.com/document_detail/2400022.html"},"productButton3":{"productButtonText":"查看更多技术解决方案","productButtonLink":"https://www.aliyun.com/solution/tech-solution/"},"productPromotionInfoBlock":[{"$id":"0","productPromotionGroupingTitle":"解决方案推荐","productPromotionInfoFirstText":"MSE实现全链路灰度","productPromotionInfoFirstLink":"https://www.aliyun.com/solution/tech-solution/iflgbomse","productPromotionInfoSecondText":"云架构必修课:云上高可用架构","productPromotionInfoSecondLink":"https://www.aliyun.com/solution/tech-solution/hablog"}],"isOfficialLogo":false},"activityCardInfo":{"activityTitle":"","activityDescription":"","cardContentBackgroundMode":"LightMode","activityContentBackgroundImageLink":"","activityCardBottomInfoSelect":"activityPromotionInfoBlock"}}