博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Nchan nginx 支持的开源消息推送模块
阅读量:6580 次
发布时间:2019-06-24

本文共 1761 字,大约阅读时间需要 5 分钟。

1. 介绍
// 官方说明Nchan is a scalable, flexible pub/sub server for the modern web, built as a module for the Nginx web server. It can be configured as a standalone server,  or as a shim between your application and hundreds, thousands, or millions of live subscribers. It can buffer messages in memory, on-disk, or via Redis.  All connections are handled asynchronously and distributed among any number of worker processes. It can also scale to many Nginx servers with Redis.Messages are published to channels with HTTP POST requests or Websocket, and subscribed also through Websocket, long-polling, EventSource (SSE), old-fashioned interval polling, and more.In a web browser, you can use Websocket or EventSource natively, or the NchanSubscriber.js wrapper library. It supports Long-Polling, EventSource, and resumable Websockets, and has a few other added convenience options. It's also available on NPM.
2. 特性
RESTful, HTTP-native API.Supports Websocket, EventSource (Server-Sent Events), Long-Polling and other HTTP-based subscribers.Per-channel configurable message buffers with no-repeat, no-loss message delivery guarantees.Subscribe to hundreds of channels over a single subscriber connection.HTTP request callbacks and hooks for easy integration.Introspection with channel events and url for monitoring performance statistics.Channel group usage accounting and limits.Fast, nonblocking shared-memory local message storage and optional, slower, persistent storage with Redis.Horizontally scalable (using Redis).Auto-failover and high availability with no single point of failure using Redis Cluster.
3. 类似nginx module
Nginx HTTP Push Module && but nchan 是完全重构的模块
4. 集群扩展
使用redis,同时默认的消息是不持久化的,对于需要持久化的消息可以使用redis,同时配置redis cluster
5. 参考文档
https://nchan.io/
 
 
 
 

转载地址:http://ymnno.baihongyu.com/

你可能感兴趣的文章
109. Convert Sorted List to Binary Search Tree
查看>>
css3 animate 和关键帧 @-webkit-keyframes
查看>>
文字链接颜色设置
查看>>
图片转流
查看>>
ubunto应用软件
查看>>
HTML 标签说明
查看>>
锋利的jQuery-2--判断jQuery获取到的对象是否存在$().length
查看>>
linux 查询系统版本命令、查询端口号是否被占用命令
查看>>
java笔记八:IO流之字符流与字符缓冲流
查看>>
Docker 命令收集
查看>>
myeclipse注册码生成器
查看>>
怎样快速学好PHP技术之PHP学习方法总结
查看>>
iOS App间相互跳转漫谈 part2
查看>>
Java CAS 原理剖析
查看>>
ISCC2014 writeup
查看>>
Kotlin 知识梳理(1) Kotlin 基础
查看>>
js正则表达式
查看>>
iOS socket通信,编解码,浮点型数据解析
查看>>
手把手教你如何新建scrapy爬虫框架的第一个项目(下)
查看>>
前端基础15:JS作用域基础
查看>>