惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

S
Security Affairs
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
Jina AI
Jina AI
P
Palo Alto Networks Blog
GbyAI
GbyAI
大猫的无限游戏
大猫的无限游戏
A
Arctic Wolf
Hugging Face - Blog
Hugging Face - Blog
小众软件
小众软件
Y
Y Combinator Blog
T
The Blog of Author Tim Ferriss
Blog — PlanetScale
Blog — PlanetScale
S
Schneier on Security
V
Vulnerabilities – Threatpost
C
Cybersecurity and Infrastructure Security Agency CISA
雷峰网
雷峰网
T
Tenable Blog
人人都是产品经理
人人都是产品经理
T
Tor Project blog
C
Cyber Attacks, Cyber Crime and Cyber Security
AWS News Blog
AWS News Blog
Microsoft Security Blog
Microsoft Security Blog
J
Java Code Geeks
Scott Helme
Scott Helme
SecWiki News
SecWiki News
C
CERT Recently Published Vulnerability Notes
Recorded Future
Recorded Future
I
InfoQ
Security Archives - TechRepublic
Security Archives - TechRepublic
Help Net Security
Help Net Security
Cloudbric
Cloudbric
C
Check Point Blog
Engineering at Meta
Engineering at Meta
TaoSecurity Blog
TaoSecurity Blog
B
Blog
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
博客园_首页
N
News and Events Feed by Topic
云风的 BLOG
云风的 BLOG
MyScale Blog
MyScale Blog
腾讯CDC
量子位
Application and Cybersecurity Blog
Application and Cybersecurity Blog
K
Kaspersky official blog
Vercel News
Vercel News
F
Full Disclosure
T
Troy Hunt's Blog
Forbes - Security
Forbes - Security
S
Security @ Cisco Blogs

博客园 - Zhenway

Azure SignalR支持replication啦 定制json序列化 今天折腾这么一个正则 docfx组件介绍--YamlSerialization docfx daylybuild docfx开源啦 docfx组件介绍--MarkdownLite docfx预热中 合并批量请求 一个简单的Linq to TreeNode 在finally中调用一个需要await的方法 当泛型方法推断,扩展方法遇到泛型类型in/out时。。。 4.5你太黑了,不带这么玩TypeForwardedTo的 一个非常简单的反射加速方案 加载时预防并发执行 又发现一个msdn的坑 又发现个.net framework的坑 sql server死锁神器 踩到一个Emit的坑,留个纪念
Azure SignalR总览
Zhenway · 2022-10-18 · via 博客园 - Zhenway

自从离开docfx组,一晃就好几年没写blog了。加上几乎所有的空闲时间都被两个娃占了,今天好不容易有点时间写写文章。最近几年一直在Azure SignalR组里混日子,就来说说Azure SignalR的各种事情。

不知道大家是否了解SignalR,简单的说就是.net上的一个websocket的应用框架,当然也支持使用long polling来处理无法建立websocket的场景。所以绝大多数情况下,大家会用SignalR来做一些准实时的信息更新,例如:股票价格、游戏、聊天等。

从dotnet core开始,新推出了Aspnet Core SignalR,重新定义了协议,与老版本的Aspnet SignalR并不通用。增加了message pack的协议,改进了对二进制的支持。

但是单机对Websocket的处理量终究是有限的,因此SignalR提供了Sql、Redis等Backplane,然后就有了Azure SignalR Service。Azure SignalR Service并不是一个Backplane,而是一个类似代理的东西,位于客户端和服务器之间。那么代理与Backplane相比,优势是什么哪?

  1. 服务器的压力不同。使用backplane,服务器需要处理客户端链接,处理客户端的消息,需要分发广播消息,需要发送到Backplane,需要处理Backplane里的消息;而使用service,服务器需要处理客户端的消息,分发组消息时,就可以委托给service处理,并且只使用非常有限的物理链接。
  2. 简化架构。使用backplane需要配置server sticky,需要配置sql或redis。而使用service时,则不需要server sticky,service会接管客户端链接。
  3. Serverless。使用service的最大优势是在某些情况话可以做到serverless。使用serverless后,service可以配置upstream,也就是客户端发的消息转换为rest api调用upstream。并且可以直接用service的rest api来发消息,或者管理客户端。这里的某些情况,其实是指流量满足下列情况:
    • 服务器广播为主(hub级或group级)。
    • 客户端只需要发少量消息或者不发消息。

今天就说这么多了,下周我再介绍一下Azure SignalR Service的使用。