azure


How do I define port for each endpoint in my azure cloud service


So I have an Azure Cloud Service, and right now it has 2 instances. I want the ability to communicate with each instance individually, and it seems to me that the info found here - https://msdn.microsoft.com/en-us/library/azure/hh180158.aspx - should give me just what I need.
What I don't understand is, how do I communicate with each instance? If I define 2 input endpoints for my web role, how does it "know" which instance responds to one port, and which to the other?
For example, here's a sample of the ServiceDefinition file Im currently playing with:
<ServiceDefinition name="BasicWrapperServices.Azure" xmlns="http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceDefinition" schemaVersion="2014-06.2.4">
<WebRole name="MyCloudService" vmsize="Medium">
<Certificates>
<Certificate name="mydomain.com" storeLocation="LocalMachine" storeName="My" />
</Certificates>
<Sites>
<Site name="Web">
<Bindings>
<Binding name="Endpoint1" endpointName="Endpoint1" />
<Binding name="HttpsIn" endpointName="HttpsIn" />
</Bindings>
</Site>
</Sites>
<Endpoints>
<InputEndpoint name="Endpoint1" protocol="http" port="80" />
<InputEndpoint name="HttpsIn" protocol="https" port="443" certificate="mydomain.com" />
<InputEndpoint name="InputEndpoint1" protocol="https" port="10000" certificate="mydomain.com"/>
<InputEndpoint name="InputEndpoint2" protocol="https" port="10001" certificate="mydomain.com" />
</Endpoints>
<Imports>
<Import moduleName="RemoteAccess" />
<Import moduleName="RemoteForwarder" />
</Imports>
</WebRole>
</ServiceDefinition>
What Im looking for here is to be able to communicate with one instance over port 10000 and the other over 10001, unless Im mistaken?
If you want to connect directly to each one of the instances without going through the Loadbalancer, then on the same URL you provided, take a look at the Direct port endpoint.
The range of the ports e.g. 10000 to 10010 are allocated sequentially to the instances of your role. Role_0 gets 10000, Role_1 get's 10001 etc. etc.
Hope it helps.
You need an InstanceInputEndpoint, not an InputEndpoint
So your config will look like this:
<InstanceInputEndpoint name="TraceEndpoint" protocol="tcp" localPort="443">
<AllocatePublicPortFrom>
<FixedPortRange max="10000" min="10010" />
</AllocatePublicPortFrom>
</InstanceInputEndpoint>
Then you can look in the old portal what endpoints are allocated.
The local port may be whatever you want.
In your case it should be 443 I guess, as you want to access the instances over https protocol. So on each instance there must be something that is listening. In your case it is the IIS, on 443 port.
Then you can access the 443 local port for each of the instances by the public IP and the public port assigned for each of them.

Related Links

Azure Cloud Service - Bad Request on external computer
VSTS deployment fails with “Authorization failed for … of type 'Microsoft.Storage/storageAccounts/providers/locks'”
How Scale-out work in Azure App Services
Azure - Best practice to scale a single thread app based on pending items
traffic manager for https azure website
How to combine account credits for Azure servers
Monitoring Bing Maps API requests
Azure AD Graph API - Assigning a group with role to a tenant's application (ServicePrincipal)
Removing Distribution Groups - Power Shell
azure data factory - performing full IDL for the first slice
Application Insights logs “no data for server exceptions”
Azure functions structure from a Git repository
Azure AD B2C samlple code for .NET 4.5
Using queues to create loosely coupled and higher reliability applications - are local queues required for reliability?
Update in USQL Azure Data lake
E_RUNTIME_SYSTEM_ERROR on Azure Data Lake Analytics

Categories

HOME
ios
graph
configuration
youtube
graylog2
applet
typeahead.js
openvpn
wikipedia-api
apple-mail
wget
tcplistener
wso2-das
pie-chart
xorg
graphengine
rebus
android-dialogfragment
jquery-selectors
drupal-commerce
nsmutableattributedstring
exe4j
powershell-v2.0
ibm-datapower
mouseevent
confidence-interval
weather-api
parallax
esri
flatbuffers
ocean
evercookie
petrel
photo-gallery
ollydbg
aem-6
hamcrest
p4-lang
data-science
decompiler
disqus
edeliver
permgen
wp-api
android-studio-2.1
distributed-lock
nscalendar
adal.js
ssms-2012
android-gps
koala-framework
masm32
typesetting
harvest-scm
postmark
formatter
enhanced-ecommerce
schematiq
illegalstateexception
samsung-gear
jedi
actioncable
openocd
python-2.3
ubiquity
monkeyrunner
perfview
scalariform
android-tablelayout
httpservice
custom-titlebar
data-dictionary
nawk
blueprint
modx-evolution
buildout
nsimageview
chomsky-hierarchy
jquery-data
kmz
asp.net-authentication
argumentexception
oncreate
arr
cellid
mdi
blackberry-os-v5
renderaction
symstore
apache-config
queryanalyzer
docking

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App