从 Web 角色和性能连接到 Azure SQL 数据库。

Connecting to azure SQL database from web role and performance.

我是 Azure 的新手,只是想了解一些事情。

我在本地有一个 Web 应用 运行,现在连接到 windows 天蓝色 SQL 数据库。我想将我的本地 Web 应用移至 Azure Web 角色。我有两个问题:

  1. 我需要更改我的连接字符串还是它就可以正常工作?
  2. 我假设 windows azure 足够聪明,现在知道它们都托管在 azure 上,因此每个请求不再需要通过 Internet 传输?

干杯

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

不,这仍然是相同的连接字符串。

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?

您是网站,SQLAzure 数据库将位于 Azure 数据中心。这取决于您的网站和数据库位于哪个区域。如果它们在同一个区域,那么延迟会很低,因为它们将在同一个数据中心,但是如果它们在两个不同的区域,那么在某一时刻它必须通过数据中心之间的连接,称为骨干网。即使那些是特殊的非常快速的连接,您也会注意到更高的延迟。

http://www.azurespeed.com/ 网站允许您检查 Azure 数据中心之间的延迟是多少。这给你一种思路。

Answer 1 : Since you are already connecting to SQL azure from local, you don't need to change the connection string.

Answer 2: If both your Web Role, and SQL azure are in same Geo Location (say SoutCentral US) then there will not be much internet traffic, but it will use azure's network to communicate.