SlideShare a Scribd company logo
1 of 13
Download to read offline
SignalR
Slawomir Dorzak
@sdorzak
What I’ll be talking about
● Scaling out your SignalR application
● Securing your endpoints
● Cross domain calls
● Things to watch out for
● Alternatives to SignalR
Scaling out your SignlaR app
● Why is it important?
○ Cloud deployments usually require more than 2
instances
○ You will need to scale out some day, so better know
your options
● Challenges
○ SignlaR needs to be aware of all connections, it
needs some way of sharing data between multiple
servers
○ All servers in the pool need to be notified when client
sends a message, connects or disconnects
○ Message patterns may vary quite a lot between
applications
Built-in scale-out support
● SignalR backplane
○ Azure ServiceBus
■ No setup needed
■ Reliability provided by ServiceBus
○ SQL Server
■ Database needs to be created upfront
■ Familiar to most developers
○ Redis
■ Install your own or use one of the "as a service"
options
■ Fast - in-memory store
○ NServiceBus
■ 3rd party alternative to Azure ServiceBus
DIY Scale-out
○ One "beefy" server
■ you can tweak it for great performance
■ you need to think about failover
strategy
■ need to be aware of the scale-up
ceiling
○ Context specific
■ great performance
■ can distribute the load more evenly
■ distribution strategy needs to be
thought through
When to use which?
● For most cases - start with built-in backplane
of choice
● If you're expecting high volumes of
messages eg. realtime gaming consider DIY
approach
● See this great talk on the subject:
○ "Scaling the Real-time Web with ASP.NET SignalR"
http://channel9.msdn.com/Events/Build/2013/3-502
Demo
Securing your endpoints
● SignalR doesn't provide any authentication
features
● Use your existing authentication eg. Forms
● Use Authorize attribute to control access to
the hub or hub methods
● Do not display connectionId to the clients as
it is used in identity verification mechanism
Securing your endpoints
● Never blindly trust the client as it can be
hijacked or spoofed
● Don't assume client is always the browser
● Communication over ws:// is unencrypted -
use wss:// instead!
● validate origin of your clients
● encode input that you broadcast to other
clients
Cross domain calls
● on the client SignalR automatically detects
cross domain URL
● it will use XHR by default with fallback to
jsonp
● on the server you need to explicitly allow
cross domain connections
RouteTable.Routes.MapHubs(
new HubConfiguration(){ EnableCrossDomain = true });
Things to watch out for
● You need one of the supported OS-es
(>Windows Server 2008R2 or > Windows 7)
● You need .NET Framework > 4.0
● IIS7 or 7.5 needs URL Extensions module,
IIS8 has builtin support
● On the client you need jQuery 1.6.4+
● For websockets transport you need the
latest browser
● Complicated stack
● DPI
● Don’t put blocking calls in your hub methods
SignalR alternatives
● Socket.IO + NodeJS
○ You can run it on Azure (yes it does run NodeJS :)
○ It's mature and widely used
○ It's not as integrated into .NET environment as
SignalR
● SuperWebSocket
○ Multiple hosting options (windows service, console
app, web app)
○ Supported on Mono
○ Lower level
● Since .NET 4.5 WCF supports Websockets
as transport
Resources
● Low level protocol introduction http://lucumr.pocoo.
org/2012/9/24/websockets-101/
● Excellent paper on websockets security http://www.
adambarth.com/papers/2011/huang-chen-barth-rescorla-jackson.pdf
● Free SignalR ebook
http://eduardopires.net.br/Repositorio/SignalR_eBook.pdf
● SignalR Github account
https://github.com/SignalR/Samples

More Related Content

What's hot

NGINX.conf 2016 - Fail in order to succeed ! Designing Microservices for fail...
NGINX.conf 2016 - Fail in order to succeed ! Designing Microservices for fail...NGINX.conf 2016 - Fail in order to succeed ! Designing Microservices for fail...
NGINX.conf 2016 - Fail in order to succeed ! Designing Microservices for fail...Dragos Dascalita Haut
 
Reduce IT Spend with Software Load Balancing
Reduce IT Spend with Software Load BalancingReduce IT Spend with Software Load Balancing
Reduce IT Spend with Software Load BalancingNGINX, Inc.
 
NGINX Amplify: Monitoring NGINX with Advanced Filters and Custom Dashboards
NGINX Amplify: Monitoring NGINX with Advanced Filters and Custom DashboardsNGINX Amplify: Monitoring NGINX with Advanced Filters and Custom Dashboards
NGINX Amplify: Monitoring NGINX with Advanced Filters and Custom DashboardsNGINX, Inc.
 
Automating security for cloud workloads (1)
Automating security for cloud workloads (1)Automating security for cloud workloads (1)
Automating security for cloud workloads (1)AnneLin19
 
Managing and Scaling Puppet - PuppetConf 2014
Managing and Scaling Puppet - PuppetConf 2014Managing and Scaling Puppet - PuppetConf 2014
Managing and Scaling Puppet - PuppetConf 2014Miguel Zuniga
 
Overview of SSL: choose the option that's right for you
Overview of SSL: choose the option that's right for youOverview of SSL: choose the option that's right for you
Overview of SSL: choose the option that's right for youCloudflare
 
Service Discovery: From Classic to VPC
Service Discovery: From Classic to VPCService Discovery: From Classic to VPC
Service Discovery: From Classic to VPCMark Corwin
 
Scaling and Orchestrating Microservices with OSGi - N Bartlett
Scaling and Orchestrating Microservices with OSGi - N BartlettScaling and Orchestrating Microservices with OSGi - N Bartlett
Scaling and Orchestrating Microservices with OSGi - N Bartlettmfrancis
 
Lagom framework
Lagom frameworkLagom framework
Lagom framework명주 김
 
NGINX for Application Delivery & Acceleration
NGINX for Application Delivery & AccelerationNGINX for Application Delivery & Acceleration
NGINX for Application Delivery & AccelerationNGINX, Inc.
 
Microservices in GO lang
Microservices in GO langMicroservices in GO lang
Microservices in GO langSHAKIL AKHTAR
 
Get acquainted with the new ASP.Net 5
Get acquainted with the new ASP.Net 5Get acquainted with the new ASP.Net 5
Get acquainted with the new ASP.Net 5Suyati Technologies
 
Microservices Using Docker Containers for Magento 2
Microservices Using Docker Containers for Magento 2Microservices Using Docker Containers for Magento 2
Microservices Using Docker Containers for Magento 2Schogini Systems Pvt Ltd
 
Developing Serverless Microservice in Rust
Developing Serverless Microservice in RustDeveloping Serverless Microservice in Rust
Developing Serverless Microservice in RustAdityo Pratomo
 
Instruments to play microservice
Instruments to play microserviceInstruments to play microservice
Instruments to play microserviceChandresh Pancholi
 
Microservice Workshop Hands On
Microservice Workshop Hands On Microservice Workshop Hands On
Microservice Workshop Hands On Ram G Suri
 

What's hot (20)

NGINX.conf 2016 - Fail in order to succeed ! Designing Microservices for fail...
NGINX.conf 2016 - Fail in order to succeed ! Designing Microservices for fail...NGINX.conf 2016 - Fail in order to succeed ! Designing Microservices for fail...
NGINX.conf 2016 - Fail in order to succeed ! Designing Microservices for fail...
 
Reduce IT Spend with Software Load Balancing
Reduce IT Spend with Software Load BalancingReduce IT Spend with Software Load Balancing
Reduce IT Spend with Software Load Balancing
 
NGINX Amplify: Monitoring NGINX with Advanced Filters and Custom Dashboards
NGINX Amplify: Monitoring NGINX with Advanced Filters and Custom DashboardsNGINX Amplify: Monitoring NGINX with Advanced Filters and Custom Dashboards
NGINX Amplify: Monitoring NGINX with Advanced Filters and Custom Dashboards
 
Automating security for cloud workloads (1)
Automating security for cloud workloads (1)Automating security for cloud workloads (1)
Automating security for cloud workloads (1)
 
Managing and Scaling Puppet - PuppetConf 2014
Managing and Scaling Puppet - PuppetConf 2014Managing and Scaling Puppet - PuppetConf 2014
Managing and Scaling Puppet - PuppetConf 2014
 
Overview of SSL: choose the option that's right for you
Overview of SSL: choose the option that's right for youOverview of SSL: choose the option that's right for you
Overview of SSL: choose the option that's right for you
 
Serverless
ServerlessServerless
Serverless
 
Service Discovery: From Classic to VPC
Service Discovery: From Classic to VPCService Discovery: From Classic to VPC
Service Discovery: From Classic to VPC
 
Scaling and Orchestrating Microservices with OSGi - N Bartlett
Scaling and Orchestrating Microservices with OSGi - N BartlettScaling and Orchestrating Microservices with OSGi - N Bartlett
Scaling and Orchestrating Microservices with OSGi - N Bartlett
 
Microservices
MicroservicesMicroservices
Microservices
 
Lagom framework
Lagom frameworkLagom framework
Lagom framework
 
Hyperledger in AWS
Hyperledger in AWSHyperledger in AWS
Hyperledger in AWS
 
NGINX for Application Delivery & Acceleration
NGINX for Application Delivery & AccelerationNGINX for Application Delivery & Acceleration
NGINX for Application Delivery & Acceleration
 
Microservices in GO lang
Microservices in GO langMicroservices in GO lang
Microservices in GO lang
 
Get acquainted with the new ASP.Net 5
Get acquainted with the new ASP.Net 5Get acquainted with the new ASP.Net 5
Get acquainted with the new ASP.Net 5
 
Microservices Using Docker Containers for Magento 2
Microservices Using Docker Containers for Magento 2Microservices Using Docker Containers for Magento 2
Microservices Using Docker Containers for Magento 2
 
Developing Serverless Microservice in Rust
Developing Serverless Microservice in RustDeveloping Serverless Microservice in Rust
Developing Serverless Microservice in Rust
 
Instruments to play microservice
Instruments to play microserviceInstruments to play microservice
Instruments to play microservice
 
Microservice Workshop Hands On
Microservice Workshop Hands On Microservice Workshop Hands On
Microservice Workshop Hands On
 
BizTalk ALM
BizTalk ALMBizTalk ALM
BizTalk ALM
 

Similar to SignalR

apidays LIVE Paris - Creating a scalable ecosystem of Microservices by Archan...
apidays LIVE Paris - Creating a scalable ecosystem of Microservices by Archan...apidays LIVE Paris - Creating a scalable ecosystem of Microservices by Archan...
apidays LIVE Paris - Creating a scalable ecosystem of Microservices by Archan...apidays
 
MariaDB Security Best Practices
MariaDB Security Best PracticesMariaDB Security Best Practices
MariaDB Security Best PracticesFederico Razzoli
 
apidays LIVE JAKARTA - 10 commandments for scalable microservices by Archanaa...
apidays LIVE JAKARTA - 10 commandments for scalable microservices by Archanaa...apidays LIVE JAKARTA - 10 commandments for scalable microservices by Archanaa...
apidays LIVE JAKARTA - 10 commandments for scalable microservices by Archanaa...apidays
 
Identity Server on Azure: A Reference Architecture
Identity Server on Azure: A Reference ArchitectureIdentity Server on Azure: A Reference Architecture
Identity Server on Azure: A Reference ArchitectureWSO2
 
Cpp In Soa
Cpp In SoaCpp In Soa
Cpp In SoaWSO2
 
SYN224: Best practices for migrating from Web Interface to StoreFront Services
SYN224: Best practices for migrating from Web Interface to StoreFront ServicesSYN224: Best practices for migrating from Web Interface to StoreFront Services
SYN224: Best practices for migrating from Web Interface to StoreFront ServicesCitrix
 
How SignalR Can Simplify Your Messaging Needs? | Virtuoso Infotech
How SignalR Can Simplify Your Messaging Needs? | Virtuoso InfotechHow SignalR Can Simplify Your Messaging Needs? | Virtuoso Infotech
How SignalR Can Simplify Your Messaging Needs? | Virtuoso InfotechVirtuosoInfotech
 
Automation Patterns for Scalable Secret Management
Automation Patterns for Scalable Secret ManagementAutomation Patterns for Scalable Secret Management
Automation Patterns for Scalable Secret ManagementMary Racter
 
Drupal and security - Advice for Site Builders and Coders
Drupal and security - Advice for Site Builders and CodersDrupal and security - Advice for Site Builders and Coders
Drupal and security - Advice for Site Builders and CodersArunkumar Kupppuswamy
 
Messaging-as-a-Service Rivieradev 2017
Messaging-as-a-Service Rivieradev 2017Messaging-as-a-Service Rivieradev 2017
Messaging-as-a-Service Rivieradev 2017Ulf Lilleengen
 
Microservices Architecture
Microservices ArchitectureMicroservices Architecture
Microservices ArchitectureLucian Neghina
 
VMware End-User-Computing Best Practices Poster
VMware End-User-Computing Best Practices PosterVMware End-User-Computing Best Practices Poster
VMware End-User-Computing Best Practices PosterVMware Academy
 
Kubernetes Clusters At Scale: Managing Hundreds Apache Pinot Kubernetes Clust...
Kubernetes Clusters At Scale: Managing Hundreds Apache Pinot Kubernetes Clust...Kubernetes Clusters At Scale: Managing Hundreds Apache Pinot Kubernetes Clust...
Kubernetes Clusters At Scale: Managing Hundreds Apache Pinot Kubernetes Clust...Xiaoman DONG
 
How to Choose the Right Technology Stack for Your Successful Crypto Exchange ...
How to Choose the Right Technology Stack for Your Successful Crypto Exchange ...How to Choose the Right Technology Stack for Your Successful Crypto Exchange ...
How to Choose the Right Technology Stack for Your Successful Crypto Exchange ...Jonathandaveiam
 
Insecurity-In-Security version.1 (2010)
Insecurity-In-Security version.1 (2010)Insecurity-In-Security version.1 (2010)
Insecurity-In-Security version.1 (2010)Abhishek Kumar
 
Ch 5: Bypassing Client-Side Controls
Ch 5: Bypassing Client-Side ControlsCh 5: Bypassing Client-Side Controls
Ch 5: Bypassing Client-Side ControlsSam Bowne
 
Magento Meetup New Delhi- Magento2 Speed Optimization
Magento Meetup New Delhi- Magento2 Speed OptimizationMagento Meetup New Delhi- Magento2 Speed Optimization
Magento Meetup New Delhi- Magento2 Speed OptimizationWebkul Software Pvt. Ltd.
 
MRA AMA Part 10: Kubernetes and the Microservices Reference Architecture
MRA AMA Part 10: Kubernetes and the Microservices Reference ArchitectureMRA AMA Part 10: Kubernetes and the Microservices Reference Architecture
MRA AMA Part 10: Kubernetes and the Microservices Reference ArchitectureNGINX, Inc.
 
What's new in confluent platform 5.4 online talk
What's new in confluent platform 5.4 online talkWhat's new in confluent platform 5.4 online talk
What's new in confluent platform 5.4 online talkconfluent
 

Similar to SignalR (20)

apidays LIVE Paris - Creating a scalable ecosystem of Microservices by Archan...
apidays LIVE Paris - Creating a scalable ecosystem of Microservices by Archan...apidays LIVE Paris - Creating a scalable ecosystem of Microservices by Archan...
apidays LIVE Paris - Creating a scalable ecosystem of Microservices by Archan...
 
MariaDB Security Best Practices
MariaDB Security Best PracticesMariaDB Security Best Practices
MariaDB Security Best Practices
 
apidays LIVE JAKARTA - 10 commandments for scalable microservices by Archanaa...
apidays LIVE JAKARTA - 10 commandments for scalable microservices by Archanaa...apidays LIVE JAKARTA - 10 commandments for scalable microservices by Archanaa...
apidays LIVE JAKARTA - 10 commandments for scalable microservices by Archanaa...
 
Identity Server on Azure: A Reference Architecture
Identity Server on Azure: A Reference ArchitectureIdentity Server on Azure: A Reference Architecture
Identity Server on Azure: A Reference Architecture
 
Cpp In Soa
Cpp In SoaCpp In Soa
Cpp In Soa
 
SYN224: Best practices for migrating from Web Interface to StoreFront Services
SYN224: Best practices for migrating from Web Interface to StoreFront ServicesSYN224: Best practices for migrating from Web Interface to StoreFront Services
SYN224: Best practices for migrating from Web Interface to StoreFront Services
 
How SignalR Can Simplify Your Messaging Needs? | Virtuoso Infotech
How SignalR Can Simplify Your Messaging Needs? | Virtuoso InfotechHow SignalR Can Simplify Your Messaging Needs? | Virtuoso Infotech
How SignalR Can Simplify Your Messaging Needs? | Virtuoso Infotech
 
Automation Patterns for Scalable Secret Management
Automation Patterns for Scalable Secret ManagementAutomation Patterns for Scalable Secret Management
Automation Patterns for Scalable Secret Management
 
Drupal and security - Advice for Site Builders and Coders
Drupal and security - Advice for Site Builders and CodersDrupal and security - Advice for Site Builders and Coders
Drupal and security - Advice for Site Builders and Coders
 
Messaging-as-a-Service Rivieradev 2017
Messaging-as-a-Service Rivieradev 2017Messaging-as-a-Service Rivieradev 2017
Messaging-as-a-Service Rivieradev 2017
 
Microservices Architecture
Microservices ArchitectureMicroservices Architecture
Microservices Architecture
 
VMware End-User-Computing Best Practices Poster
VMware End-User-Computing Best Practices PosterVMware End-User-Computing Best Practices Poster
VMware End-User-Computing Best Practices Poster
 
Kubernetes Clusters At Scale: Managing Hundreds Apache Pinot Kubernetes Clust...
Kubernetes Clusters At Scale: Managing Hundreds Apache Pinot Kubernetes Clust...Kubernetes Clusters At Scale: Managing Hundreds Apache Pinot Kubernetes Clust...
Kubernetes Clusters At Scale: Managing Hundreds Apache Pinot Kubernetes Clust...
 
How to Choose the Right Technology Stack for Your Successful Crypto Exchange ...
How to Choose the Right Technology Stack for Your Successful Crypto Exchange ...How to Choose the Right Technology Stack for Your Successful Crypto Exchange ...
How to Choose the Right Technology Stack for Your Successful Crypto Exchange ...
 
Insecurity-In-Security version.1 (2010)
Insecurity-In-Security version.1 (2010)Insecurity-In-Security version.1 (2010)
Insecurity-In-Security version.1 (2010)
 
Ch 5: Bypassing Client-Side Controls
Ch 5: Bypassing Client-Side ControlsCh 5: Bypassing Client-Side Controls
Ch 5: Bypassing Client-Side Controls
 
QueueMetrics Live
QueueMetrics LiveQueueMetrics Live
QueueMetrics Live
 
Magento Meetup New Delhi- Magento2 Speed Optimization
Magento Meetup New Delhi- Magento2 Speed OptimizationMagento Meetup New Delhi- Magento2 Speed Optimization
Magento Meetup New Delhi- Magento2 Speed Optimization
 
MRA AMA Part 10: Kubernetes and the Microservices Reference Architecture
MRA AMA Part 10: Kubernetes and the Microservices Reference ArchitectureMRA AMA Part 10: Kubernetes and the Microservices Reference Architecture
MRA AMA Part 10: Kubernetes and the Microservices Reference Architecture
 
What's new in confluent platform 5.4 online talk
What's new in confluent platform 5.4 online talkWhat's new in confluent platform 5.4 online talk
What's new in confluent platform 5.4 online talk
 

Recently uploaded

CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGSujit Pal
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 

Recently uploaded (20)

CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAG
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 

SignalR

  • 2. What I’ll be talking about ● Scaling out your SignalR application ● Securing your endpoints ● Cross domain calls ● Things to watch out for ● Alternatives to SignalR
  • 3. Scaling out your SignlaR app ● Why is it important? ○ Cloud deployments usually require more than 2 instances ○ You will need to scale out some day, so better know your options ● Challenges ○ SignlaR needs to be aware of all connections, it needs some way of sharing data between multiple servers ○ All servers in the pool need to be notified when client sends a message, connects or disconnects ○ Message patterns may vary quite a lot between applications
  • 4. Built-in scale-out support ● SignalR backplane ○ Azure ServiceBus ■ No setup needed ■ Reliability provided by ServiceBus ○ SQL Server ■ Database needs to be created upfront ■ Familiar to most developers ○ Redis ■ Install your own or use one of the "as a service" options ■ Fast - in-memory store ○ NServiceBus ■ 3rd party alternative to Azure ServiceBus
  • 5. DIY Scale-out ○ One "beefy" server ■ you can tweak it for great performance ■ you need to think about failover strategy ■ need to be aware of the scale-up ceiling ○ Context specific ■ great performance ■ can distribute the load more evenly ■ distribution strategy needs to be thought through
  • 6. When to use which? ● For most cases - start with built-in backplane of choice ● If you're expecting high volumes of messages eg. realtime gaming consider DIY approach ● See this great talk on the subject: ○ "Scaling the Real-time Web with ASP.NET SignalR" http://channel9.msdn.com/Events/Build/2013/3-502
  • 8. Securing your endpoints ● SignalR doesn't provide any authentication features ● Use your existing authentication eg. Forms ● Use Authorize attribute to control access to the hub or hub methods ● Do not display connectionId to the clients as it is used in identity verification mechanism
  • 9. Securing your endpoints ● Never blindly trust the client as it can be hijacked or spoofed ● Don't assume client is always the browser ● Communication over ws:// is unencrypted - use wss:// instead! ● validate origin of your clients ● encode input that you broadcast to other clients
  • 10. Cross domain calls ● on the client SignalR automatically detects cross domain URL ● it will use XHR by default with fallback to jsonp ● on the server you need to explicitly allow cross domain connections RouteTable.Routes.MapHubs( new HubConfiguration(){ EnableCrossDomain = true });
  • 11. Things to watch out for ● You need one of the supported OS-es (>Windows Server 2008R2 or > Windows 7) ● You need .NET Framework > 4.0 ● IIS7 or 7.5 needs URL Extensions module, IIS8 has builtin support ● On the client you need jQuery 1.6.4+ ● For websockets transport you need the latest browser ● Complicated stack ● DPI ● Don’t put blocking calls in your hub methods
  • 12. SignalR alternatives ● Socket.IO + NodeJS ○ You can run it on Azure (yes it does run NodeJS :) ○ It's mature and widely used ○ It's not as integrated into .NET environment as SignalR ● SuperWebSocket ○ Multiple hosting options (windows service, console app, web app) ○ Supported on Mono ○ Lower level ● Since .NET 4.5 WCF supports Websockets as transport
  • 13. Resources ● Low level protocol introduction http://lucumr.pocoo. org/2012/9/24/websockets-101/ ● Excellent paper on websockets security http://www. adambarth.com/papers/2011/huang-chen-barth-rescorla-jackson.pdf ● Free SignalR ebook http://eduardopires.net.br/Repositorio/SignalR_eBook.pdf ● SignalR Github account https://github.com/SignalR/Samples