(Rough notes from the session)
By Steve Marx, Technical Strategist, Microsoft Corporation
LB –> Web Role + Worker Role
Official shipping version of the Table Storage SDK is available now
What we’ll Build – Search application using IIS + SMTP + Web and Worker Roles
Azure Storage Explorer in codeplex
Input Endpoints Demo : Set the configurations in the xml file
As an Aside about Email
HOW TO: Get more RAM
Call of Action:
By Steve Marx, Technical Strategist, Microsoft Corporation
LB –> Web Role + Worker Role
Official shipping version of the Table Storage SDK is available now
What we’ll Build – Search application using IIS + SMTP + Web and Worker Roles
- Three role architecture
- Web UI (ASP.net MVC)
- SMTP Server (TCPListener)
- Search (Lucene.NET)
- New Features we’ll take advantage of
- Inter-role communication
- Non-HTTP endpoints
- Role instance lifecycle
- VM sizes
- Local storage
- Draw the boxes and arrows
- Each box is a role
- Which receive traffic from the internet
- Which need IIS?
- Which receive internal communication?
- Different ports on the same domain
- Always load balanced
- Declared in ServiceDefinition.csdef
- Handled by IIS in web roles
- Handled by your code in worker roles
- API to find
Azure Storage Explorer in codeplex
Input Endpoints Demo : Set the configurations in the xml file
As an Aside about Email
- Spammers will use Windows Azure. (sending email should not be done via azure as the IP is not trusted)
- Queues deliver messages to one worker
- We need every worker to see the messages
- Use a table instead
- build your own secondary index
- order references
- (Beware of clock drift!!)
- don’t want traffic until we are listening
- role instance lifecycle lets us prepare
- both web roles and worker roles
- OnStart() - “busy” state, initialization
- Run() – do work
- OnStop() – traffic stops, graceful shutdown
- Declare endpoints in servicedefinition.csdef
- API to find out what port to listen on:
RoleEnvironment.CurrentRoleInstance.InstanceEndpoints[“”]
HOW TO: Get more RAM
- RAMDirectory puts everything in memory
- If we have lots of data, we need lots of RAM
- Choose among four VM sizes:
- Small
- Medium
- Large
- Extra Large
- Simple edit to servicedefinition.csdef
<WorkerRole vmsize=”ExraLarge” />
- Lucene.NET writes files to the local system
- Preserve those across reboots/upgrades :
<LocalStorage cleanOnRoleRecycle=”false” /> - Consider writing state on OnStop()
(this is the to write I was on record XX and save the last state)
- Rolling Upgrade
- Specify which roles to upgrade
- Keep local storage intact
- Great for stateful roles
Call of Action:
- Any instance can talk to any other
- Don’t need IIS to listen for traffic
- Use the role instance lifecycle
- Choose different VM sizes
- In-Place upgrades
No comments:
Post a Comment