Final microsoft cloud summit - windows azure building block services

74
Windows Azure Building Block Services Adam Hoffman - @ stratospher_es / http://stratospher.es Technical Evangelist Microsoft

description

This is my presentation from the Dallas Cloud Summit on July 10th, 2012. It covers ACS and WIF, Cache, and Service Bus topics.

Transcript of Final microsoft cloud summit - windows azure building block services

Page 1: Final   microsoft cloud summit - windows azure building block services

Windows Azure Building Block ServicesAdam Hoffman - @stratospher_es / http://stratospher.esTechnical EvangelistMicrosoft

Page 2: Final   microsoft cloud summit - windows azure building block services

• Dedicated / Co-Located Cache• Windows Azure Service Bus• Windows Azure Access

Control Service• Bonus:

CloudConfigurationManager

Agenda

Page 3: Final   microsoft cloud summit - windows azure building block services

Applicationbuilding blocks

StorageBig data

Caching

CDN

Database

Identity

Media

Service Bus

Networking

Traffic

Page 4: Final   microsoft cloud summit - windows azure building block services

Applicationbuilding blocks

StorageBig data

Caching

CDN

Database

Identity

Media

Service Bus

Networking

Traffic

Page 5: Final   microsoft cloud summit - windows azure building block services

What’s the cache?

• Use spare memory on your VMs as high-performance cache

• Distributed cache cluster co-located with existing roles, or use dedicated roles

• Named caches with high availability option

• Notifications• Support Memcached protocol

Page 6: Final   microsoft cloud summit - windows azure building block services

Why dedicated cache?

FasterNo external service calls (additional network hops)Co-located in roles

CheaperNo external service calls (additional cost)Use spare memory that you already paid for

More reliableYour service is running = cache is availableNo throttling as in co-tenant environment

Page 7: Final   microsoft cloud summit - windows azure building block services

High availability? How?No code necessaryHigh availability makes duplicate copies of cache objects available on other instances of the caching role.Because of this, you need at least 3 instances of the role for true high availability.Copies can be set to 0 (default, no high availability) or 1 (high availability).

Page 8: Final   microsoft cloud summit - windows azure building block services

Cache Notifications? How?Simple to configureAfter cache notifications have been enabled, simply subscribe to the events to “listen” to the cache hits, evictions, etc.

Page 9: Final   microsoft cloud summit - windows azure building block services

Dedicated and CoLocated Cache Demo

Page 10: Final   microsoft cloud summit - windows azure building block services

Cheat Sheet

Microsoft.ApplicationServer.Caching.DataCache cache = new

Microsoft.ApplicationServer.Caching.DataCache("default");

Get a handle to the cache

Get an item from the cacheObjectType myCachedObject =

(ObjectType)cache.Get("cacheKey");

Put an item into the cachecache.Add("cacheKey", myObjectRequiringCaching);

Page 11: Final   microsoft cloud summit - windows azure building block services

Notice this?The cache requires a storage account to run against, and by default uses “Development Storage”. This is fine for demos (and in the emulator), but be sure to update that configuration before deploying to the cloud, or the role will suffer startup failures.

Page 12: Final   microsoft cloud summit - windows azure building block services

Notice this?The appropriate Expiration Type for this sort of cache is Absolute instead of Sliding Window. That way, we refresh our Twitter data every N minutes, regardless of how many people ask for it. If it was Sliding Window, we might not ever refresh and get the latest Tweets.

Page 13: Final   microsoft cloud summit - windows azure building block services

Notice this?In the autoDiscover attribute of the dataCacheClient, we need to point to the Role Name of the worker role that hosts the cache:

Page 14: Final   microsoft cloud summit - windows azure building block services

Notice this?For CoLocated caches, you end up pointing back to yourself.

Page 15: Final   microsoft cloud summit - windows azure building block services

What else can I do with the Cache?Windows Azure Load Balancer uses round-robin allocation. Session state must persist to client or storage on every request

LB

session[“foo”] = 1; session[“foo”] = 2;

What is the value of session[“foo”]?

SQL Azure

Windows Azure Storage

Session State

Page 16: Final   microsoft cloud summit - windows azure building block services

Solving Session StatePersist to Storage via Session State ProviderWindows Azure CachingSQL AzureWindows Azure Storage

Persist to ClientUse cookiesDon’t forget ASP.NET MVC TempData relies on Session State provider by default

Page 17: Final   microsoft cloud summit - windows azure building block services

Session State with Cache

Demo

Page 18: Final   microsoft cloud summit - windows azure building block services

Cheat SheetConfigure the application to use the Cache based State Provider

Page 19: Final   microsoft cloud summit - windows azure building block services

Notice this?To use the cache as a session state provider, remember to change Expiration Type to “Sliding Window” instead of “Absolute” or your Sessions will evaporate unexpectedly.

Page 20: Final   microsoft cloud summit - windows azure building block services

What else can I do with the Cache?The Output Cache Provider for Windows Azure Caching is an out-of-process storage mechanism for output cache data. This data is specifically for full HTTP responses (page output caching). The provider plugs into the new output cache provider extensibility point that was introduced in ASP.NET 4.

Page Output Caching.

Page 21: Final   microsoft cloud summit - windows azure building block services

Cheat SheetConfigure the application to use the Cache based Page Output Provider<caching>

<outputCache defaultProvider="DistributedCache">

<providers> <add name="DistributedCache"

type="Microsoft.Web.DistributedCache.DistributedCacheOutputCacheProvider, Microsoft.Web.DistributedCache"

cacheName="default" dataCacheClientName="default" />

</providers> </outputCache>

</caching>Add an OutputCache directive to pages that you wish to cache output.<%@ OutputCache Duration="60" VaryByParam="*" %>

Page 22: Final   microsoft cloud summit - windows azure building block services

Memcached support• Host a Memcached

cluster in Work Roles• Access a Memcached

cluster from Web/Worker RolesCache worker role

Memcached Shim

Memcached Client

Web/WorkerRole

Web/WorkerRole

M

M

Web/Worker Role

Memcached Shim

Memcached Server

M

Nuget: Microsoft.WindowsAzure.Caching.MemcacheShim

Page 23: Final   microsoft cloud summit - windows azure building block services

Applicationbuilding blocks

StorageBig data

Caching

CDN

Database

Identity

Media

Service Bus

Networking

Traffic

Page 24: Final   microsoft cloud summit - windows azure building block services

Service Bus Relay

Page 25: Final   microsoft cloud summit - windows azure building block services

Cloud/On-Premise Integration

Cloud-Hosted, reliable asynchronous Messaging Infrastructure with Publish/Subscribe

Cloud-Based Relay enabling NAT/Firewall Traversal for reach into on-premises assets

Page 26: Final   microsoft cloud summit - windows azure building block services

RelayService Bus Relay solves the challenges of communicating between on-premises applications and the outside world by allowing on-premises web services to project public endpoints. Systems can then access these web services, which continue to run on-premises from anywhere on the planet.

Page 27: Final   microsoft cloud summit - windows azure building block services

Relay Programming ModelFull WCF Programming ModelBindings functionally symmetric with WCFWebHttpRelayBinding (HTTP/REST)BasicHttpRelayBinding (SOAP 1.1)WS2007HttpRelayBinding (SOAP 1.2)NetTcpRelayBinding (Binary transport)

Special Service Bus BindingsNetOnewayRelayBinding (Multicast one-way)NetEventRelayBinding (Multicast one-way)

Transport binding elements for custom binding stacks

WebHttpRelayBinding provides full interoperability with any HTTP/REST client, BasicHttpRelayBinding with any SOAP client

Page 28: Final   microsoft cloud summit - windows azure building block services

Service Bus: RelayDemo

We’ll host a service in a console application, and project its TCP endpoint through the Service Bus to make it publicly available.

Page 29: Final   microsoft cloud summit - windows azure building block services

Notice this?In this case we programatically created the endpoints, instead of doing it through configuration. The relay we used in this case was NetTcpRelayBinding.// the endpoint that is projected back through the service bus (note: NetTcpRelayBinding)// This DNS name will be "sb://[serviceNamespace].servicebus.windows.net/solver"host.AddServiceEndpoint(

typeof(IProblemSolver), new NetTcpRelayBinding(),ServiceBusEnvironment.CreateServiceUri("sb", “metrobus", "solver"))

.Behaviors.Add(new TransportClientEndpointBehavior{TokenProvider = TokenProvider.CreateSharedSecretTokenProvider("owner", Microsoft.WindowsAzure.CloudConfigurationManager.GetSetting("ServiceBusSecret"))});

Page 30: Final   microsoft cloud summit - windows azure building block services

Notice this?The server has an endpoint behavior which uses the Service Bus shared secret, and so does the client. This is how the client gets access to the relay. These two code samples look the same because the are the same.Client.Behaviors.Add(

new TransportClientEndpointBehavior { TokenProvider =

TokenProvider.CreateSharedSecretTokenProvider("owner", Microsoft.WindowsAzure.CloudConfigurationManager.GetSetting("ServiceBusSecret"))

});

Page 31: Final   microsoft cloud summit - windows azure building block services

Notice this?

.Behaviors.Add(new TransportClientEndpointBehavior { TokenProvider =

TokenProvider.CreateSharedSecretTokenProvider("owner", Microsoft.WindowsAzure.CloudConfigurationManager

.GetSetting("ServiceBusSecret")) });

Server

Page 32: Final   microsoft cloud summit - windows azure building block services

Messaging

QueueAsynchronous communicationOffline processingLoad-balancing

Topic & SubscriptionAsynchronous communicationPublish/Subscription patternMessage routing

Queue Queue

Page 33: Final   microsoft cloud summit - windows azure building block services

Queues - Ways to Pull

Receive and DeleteFastest. Message lost if receiver crashes or transmission fails.

Peek LockMessage is locked when retrieved. Reappears on broker when not deleted within lock timeout.

Receive and Delete

2. Delete/Unlock

1. Peek/Lock

Page 34: Final   microsoft cloud summit - windows azure building block services

Broker Message

Messages

Brokered messaging properties are not SOAP headers

Properties are key/value pairs that may very well carry payloads

It’s not uncommon to have messages with empty message bodies

Key Value

Key Value

Key Value

Key Value

Body

Page 35: Final   microsoft cloud summit - windows azure building block services

Queues vs. Queues

Azure Queues• Part of the Windows Azure storage infrastructure• Simple REST-based Get/Put/Peek interface

Message Bus Queues• Part of a broader Windows Azure messaging infrastructure • Built on top of the broader “brokered messaging” infrastructure

designed to integrate applications or application components that may span multiple communication protocols, data contracts, trust domains, and/or network environments (i.e., are side by side with topics, queues, relays and the rest)

http://aka.ms/q-vs-q

Page 36: Final   microsoft cloud summit - windows azure building block services

Queues vs. Queues, ConsiderationsConsider Azure Queues if:• Your application needs to store over 5 GB worth of messages in a

queue, where the messages have a lifetime shorter than 7 days.• Your application requires flexible leasing to process its messages. This

allows messages to have a very short lease time, so that if a worker crashes, the message can be processed again quickly. It also allows a worker to extend the lease on a message if it needs more time to process it, which helps deal with non-deterministic processing time of messages.

• Your application wants to track progress for processing a message inside of the message. This is useful if the worker processing a message crashes. A subsequent worker can then use that information to continue where the prior worker left off. You can update queue messages “in flight”.

• You require server side logs of all of the transactions executed against your queues (via the Storage Analytics Logging feature).http://aka.ms/q-vs-q

Page 37: Final   microsoft cloud summit - windows azure building block services

Queues vs. Queues, ConsiderationsConsider Message Bus Queues if:• Your solution needs to be able to support automatic duplicate

detection (e.g. eCommerce)• The time-to-live (TTL) characteristic of the application-specific

workload can exceed the 7-day period.• Your application handles messages that can exceed 64 KB but will not

likely approach the 256 KB limit.• Your solution requires the queue to provide a guaranteed first-in-first-

out (FIFO) ordered delivery.• Your queue size will not grow larger than 5 GB.• Your messaging solution needs to be able to support the “At-Most-

Once” delivery guarantee without the need for you to build the additional infrastructure components.

• You would like to be able to publish batches.http://aka.ms/q-vs-q

Page 38: Final   microsoft cloud summit - windows azure building block services

Queues vs. Queues, Side by Side

http://aka.ms/q-vs-q

Comparison Criteria Windows Azure Queues Service Bus Queues

Ordering guarantee No

Yes - First-In-First-Out (FIFO) (through the use of messaging sessions)

Delivery guarantee At-Least-Once At-Least-Once At-Most-Once

Transaction support No Yes (through the use of local transactions)

Lease/Lock duration30 seconds (default) 7 days (maximum)

60 seconds (default) 5 minutes (maximum)

Batched send No

Yes (through the use of transactions or client-side batching)

Page 39: Final   microsoft cloud summit - windows azure building block services

Service Bus: QueuesDemo

Page 40: Final   microsoft cloud summit - windows azure building block services

Cheat Sheet

namespaceManager = Microsoft.ServiceBus.NamespaceManager

.CreateFromConnectionString(“…”);

NamespaceManager is the root of managing your namespace!

Create the Queue if necessary

if (!namespaceManager.QueueExists(queueName)) namespaceManager.CreateQueue(queueName);

Page 41: Final   microsoft cloud summit - windows azure building block services

Cheat SheetWhat does a Service Bus connection string look like?Endpoint=

sb://<namespace>.servicebus.windows.net/;

SharedSecretIssuer=<issuer>;SharedSecretValue=<sharedSecret>

Page 42: Final   microsoft cloud summit - windows azure building block services

Cheat SheetMessagingFactory and MessageSender let you create itemsif (messagingFactory == null)

messagingFactory = MessagingFactory.CreateFromConnectionString(“…”);if (messageSender == null)

messageSender = messagingFactory.CreateMessageSender(queueName);

Page 43: Final   microsoft cloud summit - windows azure building block services

Cheat SheetNow, with that MessageSender, create some BrokeredMessage(s)BrokeredMessage message = new BrokeredMessage();message.Label = “Hello from your new message.”message.Properties.Add( new KeyValuePair<string,object>(“FirstName", “Adam"));message.Properties.Add( new KeyValuePair<string,object>(“LastName", “Hoffman"));

messageSender.Send(message);

Page 44: Final   microsoft cloud summit - windows azure building block services

Cheat SheetMessagingFactory and MessageReceiver let you get those itemsif (messagingFactory == null)

messagingFactory = MessagingFactory.CreateFromConnectionString(“…”);if (messageReceiver == null)

messageReceiver = messagingFactory.CreateMessageReceiver(queueName);

Page 45: Final   microsoft cloud summit - windows azure building block services

Cheat SheetNow, with that MessageReceiver, grab those BrokeredMessage(s)BrokeredMessage message = new BrokeredMessage();// wait only 5 seconds...message = messageReceiver.Receive(new TimeSpan(0, 0, 5)); if (message != null){

try{…// Remove message from queuemessage.Complete();

}catch (Exception){

// Indicate a problem, unlock message in queuemessage.Abandon();

}}

Page 46: Final   microsoft cloud summit - windows azure building block services

Queues vs. Topics

Sequential Message Log

Competing Consumers

Shared Cursors and Locks over the log

Sequential Message Log

Multiple subscribers over the log, each with own cur/locks

Subscribers can filter with expressions on properties

Competing Consumers on each subscription

SubSubSub

Page 47: Final   microsoft cloud summit - windows azure building block services

Topic Filters

Filter conditions operate on message properties and are expressed in SQL’92 syntax InvoiceTotal > 10000.00 OR ClientRating <3ShipDestCtry = ‘USA’ AND ShipDestState=‘WA’LastName LIKE ‘V%’

Page 48: Final   microsoft cloud summit - windows azure building block services

Why Topics?

SubSubSub

Message DistributionEach receiver gets its own copy of each message. Subscriptions are independent. Allows for many independent ‘taps’ into a message stream. Subscriber can filter down by interest.

Constrained Message Distribution (Partitioning)Receiver get mutually exclusive slices of the message stream by creating appropriate filter expressions.

Page 49: Final   microsoft cloud summit - windows azure building block services

Don’t forget, the sender can be anyone.

Page 50: Final   microsoft cloud summit - windows azure building block services

Service Bus: Topics and Subscriptions

Demo

Page 51: Final   microsoft cloud summit - windows azure building block services

Cheat Sheet

namespaceManager = Microsoft.ServiceBus.NamespaceManager

.CreateFromConnectionString(“…”);

NamespaceManager is (again) the root of managing your namespace!

Create the Topic if necessary

if (!namespaceManager.TopicExists(topicName)) namespaceManager.CreateTopic(topicName);

Page 52: Final   microsoft cloud summit - windows azure building block services

Cheat Sheet – SendingTopicClient let’s you send BrokeredMessage(s)

TopicClient topicClient = TopicClient.CreateFromConnectionString(“…”, topic);

BrokeredMessage message = new BrokeredMessage();message.Label = “Hello from your new message.”message.Properties.Add(

new KeyValuePair<string,object>(“FirstName", “Adam"));message.Properties.Add(

new KeyValuePair<string,object>(“LastName", “Hoffman"));

topicClient.Send(message);

Page 53: Final   microsoft cloud summit - windows azure building block services

Cheat Sheet - ReceivingNamespaceManager helps create the subscription.

if (!NamespaceManager.SubscriptionExists(topicName, "AllMessages")){NamespaceManager.CreateSubscription(

topicName, "AllMessages");

ListenForMessages(topicName);}

Page 54: Final   microsoft cloud summit - windows azure building block services

Cheat Sheet - ReceivingMessagingFactory and MessageReceiver let you get the messages.MessagingFactory mf = MessagingFactory.CreateFromConnectionString(“…”);MessageReceiver mr = mf.CreateMessageReceiver(

topicName + "/subscriptions/" + "AllMessages");

BrokeredMessage message = mr.Receive();…// Remove message from subscriptionmessage.Complete();Or…// Indicate a problem, unlock message in subscriptionmessage.Abandon();

Page 55: Final   microsoft cloud summit - windows azure building block services

Cheat Sheet – Filtering the messagesFilters parameterize the Subscription…SqlFilter highMessagesFilter = new SqlFilter("MessageNumber > 3"); NamespaceManager.CreateSubscription("TestTopic", "HighMessages", highMessagesFilter);SqlFilter highMessagesFilter = new SqlFilter(“FirstName = ‘Adam’"); NamespaceManager.CreateSubscription("TestTopic", “GuysNamedAdam", adamMessageFilter);

MessageReceiver mr = mf.CreateMessageReceiver(topicName + "/subscriptions/" + “GuysNamedAdam");

Page 56: Final   microsoft cloud summit - windows azure building block services

Applicationbuilding blocks

StorageBig data

Caching

CDN

Database

Identity

Media

Service Bus

Networking

Traffic

Page 57: Final   microsoft cloud summit - windows azure building block services

Security challenge

Your App

Authentication

Authorization

User store

ManagementUI

Forget password?

Customersupport Data

protection

Integrationwith AD

LDAPUser

mapping

Synchronization

IntegrationWith

Facebook

MoreUser

mapping

FacebookAuth API

MoreSynchronizatio

n

Page 58: Final   microsoft cloud summit - windows azure building block services

Solution: Claim-based architecture

Your App

?“User is Joe”“Role is Administrator”

ACS +

WIF

Page 59: Final   microsoft cloud summit - windows azure building block services

Solution: Claim-based architecture

LegendIP = Identity ProviderACS = Access Control ServiceRP = Relying Party (your app)Client = Your Users

Page 60: Final   microsoft cloud summit - windows azure building block services

Digital identity in a nutshell

Seat is 28A

ACSWIF

IdP

IdP

Token

Token

User

RP Claim:

Home Realm Discovery

Page 61: Final   microsoft cloud summit - windows azure building block services

ACS

Page 62: Final   microsoft cloud summit - windows azure building block services

Federated security with ACS

Demo

Page 63: Final   microsoft cloud summit - windows azure building block services

Notice this?Implementing a “claims transformer”.

public class RoleSetter : ClaimsAuthenticationManager{

public override ClaimsPrincipal Authenticate(string resourceName, ClaimsPrincipal incomingPrincipal)

{if (incomingPrincipal != null &&

incomingPrincipal.Identity.IsAuthenticated == true){

//DECIDE ON SOME CRITERIA IF CURRENT USER DESERVES THE ROLEClaimsIdentity identity =

(ClaimsIdentity)incomingPrincipal.Identity;IEnumerable<Claim> claims = identity.Claims;

if (DoYourCheckHere())((ClaimsIdentity)incomingPrincipal.Identity).AddClaim(new Claim(ClaimTypes.Role, "Admin"));

}return incomingPrincipal;

}

Page 64: Final   microsoft cloud summit - windows azure building block services

Notice this?Wiring up a “claims transformer”.

<system.identityModel> <identityConfiguration> <claimsAuthenticationManager

type="ClaimsTransformer.RoleSetter, ClaimsTransformer"/>

Page 65: Final   microsoft cloud summit - windows azure building block services

Notice this?Checking for a claim (e.g. a role check):

if (User.IsInRole("Admin"))Response.Write("The code is

42...<br/>");else

Response.Write(“No soup for you.");

Page 66: Final   microsoft cloud summit - windows azure building block services

Bonus: CloudConfigurationManagerDemo

Page 67: Final   microsoft cloud summit - windows azure building block services

Notice this?The output window shows the path of trying to get the config values:

Page 68: Final   microsoft cloud summit - windows azure building block services

© 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Page 69: Final   microsoft cloud summit - windows azure building block services

Download the Windows Azure SDK!

http://aka.ms/GetAzureNow

SDKs for .NET, Java, PHP, Node.js and PythonSample librariesTutorials and VideosCommunity ForumsMuch, much more!

Page 70: Final   microsoft cloud summit - windows azure building block services

Sign Up for Windows AzureMSDN Subscription Benefits

Free Windows Azure access for Professional, Premium, and Ultimate subscribers

Designed to accelerate development

Requires credit card at sign-up for any overages beyond free allocation

3 Month Free Trial

ComputeStorageTransactionsBandwidth

DatabasesCachingAccess ControlService Bus

INCLUDES THESE SERVICES: BENEFITS INCLUDE:

http://aka.ms/MSDNAzurehttp://aka.ms/Azure90DayTrial

Page 71: Final   microsoft cloud summit - windows azure building block services

OnewayNetOnewayRelayBindingAll TCP and HTTP listeners use one-way as internal control channel60KB message-size limitOne-way onlyNo rendezvous overhead

Backend

NamingRouting

Fabric

solution. a b

FrontendNodes

outbound

connect one-way

net.tcp

outbound connect bidi socket

MsgMsg

NATFirewall

Dynamic IP

NLB TCP/SSL HTTP(S)TCP/SSL HTTP(S)

RouteSubscribe

Page 72: Final   microsoft cloud summit - windows azure building block services

Event•NetEventRelayBinding

•Small-Scale Synchronous Multicast

•60KB message-size limit

•One-way only

•No rendezvous overhead

Backend

NamingRouting

Fabric

solution. a b

FrontendNodes

outbound

connect one-way

net.tcp

outbound connect bidi socket

MsgMsg

TCP/SSL HTTP(S)TCP/SSL HTTP(S)

RouteSubscribe

outbound connect bidi socket

Msg

Page 73: Final   microsoft cloud summit - windows azure building block services

Rendezvous(TCP & HTTP)

•NetTcpRelayBinding

•WebHttpRelayBinding

•BasicHttpRelayBinding

•WS2007RelayBinding

•Rendezvous Handshake

•Bi-Directional

•Net.Tcp Full Duplex

•No message size limit

solution. a b

NLB

outbound socket rendezvous

HTTP/SocketForwarder

outbound

socket connect

Ctrl

Ctrl

TCP/SSL or HTTP

Backend

NamingRouting

Fabric

FrontendNodes

Page 74: Final   microsoft cloud summit - windows azure building block services

solution. a bBacken

dNamingRouting

Fabric

FrontendNodes

Hybrid Connect

•Special Mode of NetTcpRelayBinding

•TcpRelayConnection-Mode.Hybrid

•Starts as relayed connection

•Performs NAT probing and behavior prediction

•Establishes direct connection and upgrades if possible

•Upgrade driven by traffic

•Takes large transfers off the Relay

•No transfer charges, lower latency

relayed connect

NAT Probing

CtrlNAT Probing

NAT Traversal Connection

Upgrade

Upgrade

relayed rendezvous

Oneway RendezvousCtrl Msg

TCP/SSL HTTP(S)