并发 Sql Server 连接数

Number of concurrent Sql Server connections(并发 Sql Server 连接数)
本文介绍了并发 Sql Server 连接数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在创建一个带有 Sql Server 数据库引擎的 .net 应用程序.我希望每秒有成千上万的用户访问我的网站.连接数取决于什么?IIS可以保持多少连接,Sql Server?

I am creating a .net application, with a Sql Server db engine. I would like my site to be accessed by thousands of users per second. What does the number of connections rely on? How many connection can IIS hold, and Sql Server?

推荐答案

首先,连接和连接池是有区别的.调查一下是不是很好,因为它在性能上有很大的不同.如果您需要参考,我可以挖掘一个,但 google/bing 是您的朋友.关键要点是:将连接池的数量保持在最低限度.

First, there is a difference between connections and connection pools. Is it good to look into that, as it makes a huge difference in performance. If you need a reference, I can dig one up, but google/bing is your friend here. The key takeaway is: keep the number of connections pool to a minimum.

话虽如此,连接数取决于两件事.

With that said, the number of connection depends on two things.

  1. 您使用的是 Windows 身份验证吗?如果是这样,每个不同的用户都会导致不同的连接/连接池

  1. Are you using Windows Auth? If so, every distinct user will cause a distinct connection/connection pool

如果您使用的是 SQL Auth,那么每个不同的连接字符串都会导致创建一个新池(即使是单个空格差异也会导致一个新池).

If you are using SQL Auth, then each different connection string will cause a new pool to be created (even a single space difference will cause a new pool).

关于扩展问题,IIS 和 SQL Server 都可以处理大量连接.如果您遇到连接限制,您可能应该看看应用程序设计.

In regards to the scaling question, both IIS and SQL Server can handle an very high number of connections. If you are running into connection limits, you should probably take a look at the application design.

埃里克

这篇关于并发 Sql Server 连接数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本站部分内容来源互联网,如果有图片或者内容侵犯您的权益请联系我们删除!

相关文档推荐

c# Generic Setlt;Tgt; implementation to access objects by type(按类型访问对象的C#泛型集实现)
InvalidOperationException When using Context Injection in ASP.Net Core(在ASP.NET核心中使用上下文注入时发生InvalidOperationException)
how do i pass parameters to aspnet reportviewer(如何将参数传递给aspnet report查看器)
Bind multiple parameters from route and body to a model in ASP.NET Core(在ASP.NET Core中将路由和主体中的多个参数绑定到一个模型)
Custom model binding in AspNet Core WebApi?(AspNet Core WebApi中的自定义模型绑定?)
How to minify in .net core mvc view?(如何在.Net核心MVC视图中缩小?)