Search code examples
azurearchitectureazure-sql-databaseazure-web-roles

Connecting to azure SQL database from web role and performance.


I am new to Azure and just trying to get my head around some things.

I have a web app running locally that now connects to a windows azure SQL database. I want to move my local web app into an azure web role. I have two questions:

  1. Do I need to change my connection string or does it just work?
  2. I am assuming windows azure is smart enough to now know that they are both hosted on azure so each request no longer needs to go over the internet?

Cheers


Solution

  • Do I need to change my connection string or does it just work?

    No, this is still that same connection string.

    I am assuming windows azure is smart enough to now know that they are both hosted on azure so each request no longer needs to go over the internet?

    You're both web site and SQL Azure database will be in Azure data center. It depends in which region your web site and database will be. If they are in the same region you'll have low latencies because it will be in the same data center, however if they are in two different regions, then at one point it has to go through connections between data centers called backbones. Even if those are special very fast connections you'll notice higher latencies.

    http://www.azurespeed.com/ web site allows you to check what are the latencies between Azure data centers. This gives you a kind of idea.