我们已经启动并运行了一个网站,并且决定迁移到 Azure。 使用DMA(数据迁移助手)将数据库迁移到SQL Azure,我们在Azure上创建了一个VM,然后我们在VM上的IIS上发布了网站。 现在,我们有两个不同的域和两个不同的数据库,旧网站比新网站( azure 网站)快得多。 我们无法准确找到瓶颈在哪里;在数据库中,或在连接中,或在VM(处理器或IIS,...)中。
Azure资源的规范:
- 虚拟机:标准 D2s v3(2 个 vcpu、8 GB 内存)
- DB:高级 P1:125 个 DTU
谁能告诉我们如何检测这种缓慢的主要原因?
最佳答案
如果您的应用程序已加载,则最佳实践是将您的应用程序托管在不同的 Azure 计算机上,将数据库托管在不同的 Azure 服务器上,并在计算机之间建立虚拟网络。
When you create an Azure virtual machine (VM), you must create a virtual network (VNet) or use an existing VNet. You also need to decide how your VMs are intended to be accessed on the VNet. It is important to plan before creating resources and make sure that you understand the limits of networking resources.
负载均衡器
Azure Load Balancer delivers high availability and network performance to your applications. A load balancer can be configured to balance incoming Internet traffic to VMs or balance traffic between VMs in a VNet. A load balancer can also balance traffic between on-premises computers and VMs in a cross-premises network, or forward external traffic to a specific VM.
The load balancer maps incoming and outgoing traffic between the public IP address and port on the load balancer and the private IP address and port of the VM.
阅读this配置。
关于sql-server - SQL Azure 速度很慢,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53082369/