Web 2.0 Push Technical overview<br />Netscaler Product Group<br />
Web 2.0 - Server Push or Reverse Ajax<br />Reverse Ajax is the ability to push data from a web or app server to the browse...
Client Update: Three Common Techniques<br />Server Push<br />Client Pull<br />
Server<br />Client<br />Client<br />Req<br />Req_1<br />t<br />Quiet period<br />Quiet period (y)<br />Query finishes<br /...
NetScaler Web 2.0 Push: Offloading Connection Management<br />Benefits<br />Improves server utilization by 10x<br />Improv...
NetScaler Web 2.0 Push: Asynchronous Connection Mgmt<br /><ul><li>NetScaler  acts as a full proxy between subscribers (per...
Parks millions of persistent client connections
Enables configuration driven approach to identifying a client connection and server push setup – aka label
Offloads client connection management from servers
Reuses server connections thus improving server utilization and “push”es data to client based on returned label
Enables all existing policy, availability and security services across asynchronous interaction</li></li></ul><li>NetScale...
NetScaler Web 2.0 Push Building Blocks<br />Connection Labeling Protocol<br />Receive and terminate connections; decrypt a...
NetScaler Web 2.0 Push : An Example Setup<br />Server Push messages are sent to NetScaler over a few pooled connections<br...
PUSH_VIP: IP-Prt<br />NS_HDR<br />GET<br />RES<br />DEFERABLE = Yes, Label = L1<br />msg0<br />msg1<br />msg2<br />POST /c...
Upcoming SlideShare
Loading in …5
×

NetScaler Web2.0 Push Technology Overview

3,179 views
3,044 views

Published on

NetScaler Web 2.0 Push technology scales Comet or Reverse Ajax applications that depend on long running idle client connections. It offloads server load by handling all the client connections on the NetScaler and publishing a REST API for the server application to send periodic updates.

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

  • Be the first to like this

No Downloads
Views
Total views
3,179
On SlideShare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
92
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

NetScaler Web2.0 Push Technology Overview

  1. 1. Web 2.0 Push Technical overview<br />Netscaler Product Group<br />
  2. 2. Web 2.0 - Server Push or Reverse Ajax<br />Reverse Ajax is the ability to push data from a web or app server to the browser, without user interaction<br />&quot;Publish-Subscribe&quot; model<br />Clients subscribe to information channels/feed<br />Servers push “new” information out to the subscribers<br />Many different names and techniques<br />HTTP Server Push<br />HTTP Streaming<br />COMET (Server Push + Long Polling)<br />Long Polling<br />BOSH (Bidirectional-streams Over Synchronous HTTP )<br />© The Coding Machine<br />
  3. 3. Client Update: Three Common Techniques<br />Server Push<br />Client Pull<br />
  4. 4. Server<br />Client<br />Client<br />Req<br />Req_1<br />t<br />Quiet period<br />Quiet period (y)<br />Query finishes<br />Req_2<br />Quiet period<br />Quiet period (y)<br />Query finishes<br />Chunk_1 (data)<br />Chunk_0 (data)<br />Chunk_2 (data)<br />Req_3<br />Server Push – Two Common Techniques<br />Long Polling<br />Streaming<br />Server<br />Time<br />Connection resource tied up on Server<br />Connection resource tied up on Server<br />t + y<br />t + 2y<br />
  5. 5. NetScaler Web 2.0 Push: Offloading Connection Management<br />Benefits<br />Improves server utilization by 10x<br />Improves application responsiveness<br />Cuts data center energy and cooling costs<br />Availability<br />Available in NetScaler 9.x – (March 2009)<br />Available in Platinum and Enterprise edition<br />Requires custom script development to adapt a given application to work with our Push technology to enable tagging data streams as “Server Push-able”<br />Millions of clients<br />Few servers<br />
  6. 6. NetScaler Web 2.0 Push: Asynchronous Connection Mgmt<br /><ul><li>NetScaler acts as a full proxy between subscribers (persistent clients) and publishers (push servers)
  7. 7. Parks millions of persistent client connections
  8. 8. Enables configuration driven approach to identifying a client connection and server push setup – aka label
  9. 9. Offloads client connection management from servers
  10. 10. Reuses server connections thus improving server utilization and “push”es data to client based on returned label
  11. 11. Enables all existing policy, availability and security services across asynchronous interaction</li></li></ul><li>NetScaler Web 2.0 Push Message Flow<br />Step 1: Connection Setup<br />Step 2: Client Identification<br />Step 3: Connection Labeling<br />Step 4: Server Push<br />
  12. 12. NetScaler Web 2.0 Push Building Blocks<br />Connection Labeling Protocol<br />Receive and terminate connections; decrypt and analyze every request <br />Setup transaction label over multiplexed HTTP connections<br />Push Switching Protocol<br />NetScaler accepts asynchronous out of band label updates over few TCP connections<br />NetScaler demultiplexes label and dispatches updates over persistent client connections<br />
  13. 13. NetScaler Web 2.0 Push : An Example Setup<br />Server Push messages are sent to NetScaler over a few pooled connections<br />Client-VIP<br />10.217.6.86:80<br />Push-VIP<br />10.217.6.87:80<br />Server<br />10.217.6.53:80<br />Client<br />10.216.134.59<br />
  14. 14. PUSH_VIP: IP-Prt<br />NS_HDR<br />GET<br />RES<br />DEFERABLE = Yes, Label = L1<br />msg0<br />msg1<br />msg2<br />POST /client/L1<br />POST /client/L1<br />POST /client/L1<br />data0<br />data1<br />final<br />NetScaler Web 2.0 Push: HTTP Streaming Support<br />NetScaler<br />AppServer<br />Client<br />Messaging Bus<br />V<br />I<br />P<br />Labeling protocol<br />Transaction Labeled. <br />TCP connection can be optionally closed<br />GET<br />RES-HDR<br />Quiet period. NS holding onto client connection.<br />P<br />U<br />S<br />H<br />-<br />V<br />I<br />P<br />Quiet period. Waiting for next update.<br />Chunk_0 (data)<br />Quiet period. NS holding onto client connection.<br />Quiet period. Waiting for next update.<br />Chunk_1 (data)<br />LastChunk (data)<br />
  15. 15. Request from NetScaler to Server<br />Request from Client (Browser) to NetScaler VIP<br />Response from NetScaler VIP to Client (Browser)<br />Response from Server to NetScaler<br />Connection Labeling Protocol<br />Client to Server<br />Server to Client<br />
  16. 16. NetScaler Push Updates<br />Update from Server to Push VIP using REST API<br />Update forwarded to Client by NetScaler<br />Status Ack from NetScaler to Server in XML<br />
  17. 17. Application code change for NetScaler Web 2.0 Push<br />def longpoll_update(np, pushvs, label):<br /> holdtime = 10 + random.randint(0,5)<br /> time.sleep(holdtime)<br /> data = mesg % (label, holdtime)<br />np.push_post_update(pushvs, label, data, True)<br />def process_request():<br /> pushvs = os.environ.get(&apos;HTTP_NSPUSHVSERVER&apos;, &apos;&apos;)<br /> if pushvs == &apos;&apos;:<br /> print &quot;Content-Type: text/html&quot;<br /> print &quot;&quot;<br /> print &quot;NetScaler PUSH functionality not enabled. &quot;<br /> sys.exit()<br />np = nspush.NsPushMgr()<br />label = np.push_label_client()<br /> #daemonize this process, so the parent exits <br /> # and the long poll will send update later<br /> daemon.createDaemon()<br /> longpoll_update(np, pushvs, label)<br />if __name__ == &apos;__main__&apos;:<br /> process_request()<br />class NsPushMgr:<br /> def push_label_client(self):<br /> label = str(int(time.time()))<br /> print &quot;NSDEFERRABLE: YES&quot;<br /> print &quot;NSSERVERLABEL: &quot;, label<br /> print &quot;Content-Type: text/html&quot;<br /> print &quot;&quot;<br /> return label<br /> def push_post_update(self, pushvip, label, data, msg_end):<br /> pushvip = re.sub(&apos;_&apos;, &apos;:&apos;, pushvip)<br /> if msg_end is True:<br /> uri = &apos;/CLIENT/V10/&apos; + label + &apos;?MSG_END=1&apos;<br /> else:<br /> uri = &apos;/CLIENT/V10/&apos; + label + &apos;?MSG_END=0&apos; <br /> conn = httplib.HTTPConnection(pushvip)<br /> conn.request(&apos;POST&apos;, uri, data, {})<br /> resp = conn.getresponse()<br /> conn.close()<br />poll.py<br />nspush.py<br />

×