[Windows Azure] Load Balancing Virtual Machines
Load Balancing Virtual Machines
All virtual machines that you create in Windows Azure can automatically communicate using a private network channel with other virtual machines in the same cloud service or virtual network. However, you need to add an endpoint to a virtual machine for other resources on the Internet or other virtual networks to communicate with it.
Endpoints can be used for different purposes, such as to balance the load of network traffic among them, to maintain high availability, or for direct virtual machine connectivity through protocols such as RDP or SSH. You define endpoints that are associated to specific ports and are assigned a specific communication protocol.
An endpoint can be assigned a protocol of TCP or UDP (the TCP protocol includes HTTP and HTTPS traffic). Each endpoint defined for a virtual machine is assigned a public and private port for communication. The private port is defined for setting up communication rules on the virtual machine and the public port is used by Windows Azure to communicate with the virtual machine from external resources.
Note: If you want learn about connecting to virtual machines directly by hostname or set up cross-premises connections, see Windows Azure Virtual Network Overview.
If you configure load balancing, Windows Azure provides round-robin load balancing of network traffic to publicly defined ports of a cloud service. A load-balanced endpoint is a specific TCP or UDP endpoint used by all members of a cloud service.
For a cloud service that contains instances of web roles or worker roles, you can define a public endpoint in the service definition. For a cloud service that contains virtual machines, you group the new virtual machines in the same cloud service when you create them. You can add an endpoint to a virtual machine when you create it, or you can add it later.
The following image shows a load-balanced endpoint that is shared among three virtual machines and uses a public and private port of 80.

This task includes the following steps:
- Step 1: Create the first virtual machine and an endpoint
- Step 2: Create additional virtual machines in the same cloud service
- Step 3: Set up load balancing of the virtual machines
- Step 4: Add virtual machines to the load-balanced set
Step 1: Create the first virtual machine
You can create the first virtual machine by using either the From Gallery or the Quick Create method.
From Gallery - The From Gallery method allows you to create an endpoint when you create the virtual machine, and it allows you to specify a name for the cloud service that is created when you create the virtual machine. For instructions, see Create a Virtual Machine Running Linux or Create a Virtual Machine Running Windows Server.
Quick Create - Create a virtual machine by choosing an image from the Image Gallery and providing basic information. When you use this method, you will need to add the endpoint after you create the virtual machine. This method also creates a cloud service using a default name. For more information, see How to quickly create a virtual machine.
Note: After the virtual machine is created, the Cloud Services page of the Management Portal lists the name of the cloud service as well as other information about the service.
Step 2: Create additional virtual machines in the same cloud service
To add virtual machines to a cloud service so you can load balance them, add the virtual machines to the same cloud service when you create them. For more information about connecting virtual machines, see How to connect virtual machines in a cloud service.
Step 3: Set up load balancing of the virtual machines
After you create an endpoint on the first virtual machine and add the other virtual machines to the same cloud service, assign the endpoint to the new virtual machines for load balancing.
To set up a load-balanced endpoint
If you have not already done so, sign in to the Windows Azure Management Portal.
Click Virtual Machines, and then select one of the virtual machines in the same cloud service.
Click Endpoints.
Click Add Endpoint or select the endpoint and Edit Endpoint, depending on whether you added the endpoint when you created the virtual machine. Then do one of the following:
If you're adding an endpoint, click Add Standalone endpoint and then click the arrow.
- In Name, type a name for the endpoint.
- In Protocol, select the protocol required by the type of endpoint, either TCP or UDP.
- In Public Port and Private Port, type the port number that you want the virtual machine to use. You can use the private port and firewall rules on the virtual machine to redirect traffic in a way that is appropriate for your application. The public port is the same as the public port defined for the endpoint on the first virtual machine. The private port can be the same as the public port. For example, for an HTTP endpoint, you will likely want to assign port 80 to the public port and the private port for all virtual machines.
- Click Create a load-balanced set.
If you're editing an endpoint, click Create a load-balanced set.
On the Configure the load-balanced set page, specify a name for the load-balanced set and then assign the values for the load-balancing probe.
Click the check mark to create the load-balanced endpoint. You will see Yes in the Load-balanced set name column of the Endpoints page for both virtual machines.
Step 4: Add virtual machines to the load-balanced set
After you create the load-balanced set, add the other virtual machines to the set.
Select one of the virtual machines in the same cloud service.
Click Endpoints.
Click Add Endpoint.
Click Add endpoint to an existing load-balanced set and then click the arrow.
Specify the name and protocol for the endpoint, and then click the check mark.
Repeat the process for the rest of the virtual machines in the cloud service.
[Windows Azure] Load Balancing Virtual Machines的更多相关文章
- [Windows Azure] Create a Virtual Network for Site-to-Site Cross-Premises Connectivity
Create a Virtual Network for Site-to-Site Cross-Premises Connectivity This tutorial walks you throug ...
- [Windows Azure] Create a Virtual Network in Windows Azure
Create a Virtual Network in Windows Azure This tutorial walks you through the steps to create a basi ...
- [Windows Azure] Load Testing in Windows Azure
The primary goal of a load test is to simulate many users accessing a web application at the same ti ...
- [Windows Azure] Manage the Availability of Virtual Machines
Manage the Availability of Virtual Machines You can ensure the availability of your application by u ...
- [Windows Azure] Windows Azure Virtual Network Overview
Windows Azure Virtual Network Overview 18 out of 33 rated this helpful - Rate this topic Updated: Ap ...
- Windows Azure 名词定义(Glossary)
Glossary(名词) Definition(定义) Availability Set 可用性组 refers to two or more Virtual Machines deployed ac ...
- [SQL in Azure] Getting Started with SQL Server in Azure Virtual Machines
This topic provides guidelines on how to sign up for SQL Server on a Azure virtual machine and how t ...
- Network Load Balancing Technical Overview--reference
http://technet.microsoft.com/en-us/library/bb742455.aspx Abstract Network Load Balancing, a clusteri ...
- [Windows Azure] Walkthrough to Configure System Center Management Pack for Windows Azure Fabric Preview for SCOM 2012 SP1 (with a MetricsHub Bonus)
The wait is finally over. This is a huge update to the Azure Management Pack over the one that was r ...
随机推荐
- TabLayout基本属性全解
代码地址如下:http://www.demodashi.com/demo/14659.html 前言 之前讲过一篇TabLayout实现顶部导航的文章,这篇文章,来详细介绍下TabLayout的一些基 ...
- 【bootstrapV3】移动端和PC端的 滚动监听
1.本代码适用于 bootstrap V3 的 页面滚动监听 2.效果: 3.代码: <!DOCTYPE html> <html lang="zh-CN"> ...
- Node.js相关——CommonJS规范
1. CommonJS规范产生背景 在后端,JavaScript的规范远远落后并且有很多缺陷,这使得难以使用JavaScript开发大型应用.比如: 没有模块系统 标准库较少 没有标准接口 缺乏包管理 ...
- ios中自定义图层
图层和VIEW的区别 1:view不具备显示功能,是因view内部有一个图层,才能显示出来 2:图层不具备事件功能,VIEW继承UIRespone具有处理事件功能 3:自定义的图层有一个影式动画,VI ...
- 关于JAVA路径 问题
1.基本概念的理解 绝对路径:绝对路径就是你的主页上的文件或目录在硬盘上真正的路径,(URL和物理路径)例如: C:\xyz\test.txt 代表了test.txt文件的绝对路径.http://w ...
- IT软件外包行业深入分析:现状、前途、趋势、待遇 什么是软件外包 外包公司是怎么工作的 软件外包公司的面试 软件外包公司需要什么样的人
目录: [0] - 为什么要对大学生谈软件外包? [1] - 什么是软件外包? [2] - 软件为什么要外包? [3] - 为什么要承接软件外包 [4] - 做软件外包有前途吗? [5] - 外包公司 ...
- nRF2401A/nRF24L01/nRF24L01+无线模块最常见问题汇集(转)
俗话说:每个人一生下来什么都会的,都是通过自己努力和探索出来的,NRF系列芯片,刚开始都好奇心加兴趣才来捣鼓它的,刚开始做硬件和软件,没有收发数据弄得整个人头都快炸开了,所以在此和大家分享一下前辈的经 ...
- sudo: add-apt-repository: command not found
错误来啦:sudo: add-apt-repository:command not found 网上解决办法是直接安装工具包 命令:sudo apt-get install python-s ...
- C# Random 生成不重复随机数
命名空间:System 表示伪随机数生成器,一种能够产生满足某些随机性统计要求的数字序列的设备. 伪随机数是以相同的概率从一组有限的数字中选取的.所选数字并不具有完全的随机性,因为它们是用一种确定的数 ...
- C# 图片识别(支持21种语言)
图片识别的技术到几天已经很成熟了,只是相关的资料很少,为了方便在此汇总一下(C#实现),方便需要的朋友查阅,也给自己做个记号. 图片识别的用途:很多人用它去破解网站的验证码,用于达到自动刷票或者是批量 ...