zoukankan      html  css  js  c++  java
  • Nchan nginx 支持的开源消息推送模块

    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/
  • 相关阅读:
    linux学习方法之一
    HDU 1556 Color the ball
    Object-c学习之路十(NSNumber&NSValue)
    蜂鸣器驱动方式源程序--有源无源通用
    Wordpress更换主题之后出错
    mybatis_Generator配置
    Logistic Regression
    求两个字符串的最大公共字串
    数据结构排序系列详解之二 希尔排序
    《mysql必知必会》学习_第五章
  • 原文地址:https://www.cnblogs.com/rongfengliang/p/7865820.html
Copyright © 2011-2022 走看看