Scale your signalR realtime web application

3,727 views
3,228 views

Published on

My persentation at Sela Developer Practice conference, December 2013,

Published in: Education, Technology
0 Comments
3 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
3,727
On SlideShare
0
From Embeds
0
Number of Embeds
113
Actions
Shares
0
Downloads
0
Comments
0
Likes
3
Embeds 0
No embeds

No notes for slide

Scale your signalR realtime web application

  1. 1. SELA DEVELOPER PRACTICE December 15-19, 2013 Ran Wahle Scale-out your Real-time signalR © Copyright SELA software & Education Labs Ltd. | 14-18 Baruch Hirsch St Bnei Brak, 51202 Israel | www.selagroup.com
  2. 2. Agenda What is signalR Do-s and Don’t-s Load patterns Messurement Scaleout with backplane Custom scaleouts
  3. 3. What is signalR Pub-Sub Ability to push-notify clients Uses WebSocket | SSE | ForeverFrames | Longpolling (best feature available) WebSocket ServerSentEvents = Long-Polling ForeverFrames
  4. 4. Scaleout Web application Number of requests Memory, CPU, Disk Bandwidth
  5. 5. Scaleout signalR It’s a web application Many long requests No cache (It’s real-time) Concurrency Different transports
  6. 6. SignalR Core Architecture Publisher Message cache Message Bus Worker Worker Worker Client Client Client Client
  7. 7. Do-s Understand Hub instances lifecycle Use as many general messages as you can Use groups Use async when calling methods from Hub
  8. 8. Don’t-s Use session Keep instance members on Hubs Send large messages
  9. 9. Load patterns Server broadcast Server push User event driven High frequency real-time
  10. 10. Server broadcast Low rate broadcast Same message / payload to all users More clients doesn’t effect message bus traffic
  11. 11. Server push Low rate broadcast Unique payload per client More clients  More message bus traffic The rate is controlled
  12. 12. User event driven Broadcast on client action One message to many clients More clients  More message bus traffic Users control the rate
  13. 13. High frequency Real time Fixed High broadcast rate One message bus send  One user More clients  More traffic
  14. 14. Tools for measurement Demo
  15. 15. BackPlane Web-application are stateless signalR isn’t Client Client Client Client Hub Hub Client Client Client Client Client Client Hub Client Client Hub
  16. 16. Backplane in signalR Client Client Client Hub Client Client Client Client Hub Backplane Client Client Hub
  17. 17. Plugabble backplanes SQL Server Redis Azure service bus
  18. 18. Custom scaleout scenario Common Server Specific server Filtered service bus Server transition
  19. 19. Common Server Serve2 Server1 SignalR Chatroom?
  20. 20. Common Server Serve2 Server1 Connect to server2
  21. 21. Common Server Server1 Serve2 SignalR Chatroom?
  22. 22. Server push Server1 Server2 Ran
  23. 23. Server push Ran is connected to me Server1 Server2 Ran
  24. 24. Server push Server1 Server2 Ran, I need your laptop Ran Yaniv
  25. 25. Server push server1 Ran? Server1 Server2 Ran Yaniv
  26. 26. Server push Server1 Ran, I need your laptop Server2 Ran Yaniv
  27. 27. Server push Server1 Server2 Ran, I need your laptop Ran Yaniv
  28. 28. Filtered message bus Topic1 Topic1 Topic1 Topic1
  29. 29. Server transition Galaxy1 Galaxy2 Galaxy3
  30. 30. Questions
  31. 31. What have we seen today? signalR performance considerations Messuring and testing tools Pluggable back planes Custom scaleout scenarios
  32. 32. Thank You http://blogs.Microsoft.co.il/ranw ranw@sela.co.il © Copyright SELA software & Education Labs Ltd. | 14-18 Baruch Hirsch St Bnei Brak, 51202 Israel | www.selagroup.com

×