如何扩展web api [英] How can I scalable a web api

查看:51
本文介绍了如何扩展web api的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好我有一个web api 2,它需要一个存储过程,我几乎称之为3000 web api,所以我有3000个执行存储过程,某些时刻我有一个bug conextion timeout

我的comandTimeout是3分钟

解决这个可伸缩性问题的架构或SQL Server级别的解决方案谢谢

hello I have a web api 2 which called for a stored procedure and I almost called this 3000 web api so I have 3000 execution of a stored procedure and certain moment I had a bug conextion timeout
my comandTimeout is 3 minute
what the solution at the architecture or the SQL Server level to solve this scalability problem thank you

推荐答案

作为我在之前的转发中提到过。您还没有给我们足够的信息来帮助您。



您好像在调用1次存储过程3000次,或者同时调用3,000个存储过程时间。无论哪种方式都是疯狂的。



您的问题与基础设施无关,与设计有关。你需要重新思考你想要完​​成的设计,而不仅仅是在硬件/资源方面投入更多资金。



记住,我们无法访问您的硬盘驱动器,您的代码,也无法读懂您的想法或了解您的项目。您已经说明了您的问题,好像我们对您的问题/项目有深入了解,并希望有人提供有意义的建议。直到你后退并意识到你可能需要重新考虑你的SP,你将不断遇到这个问题
As i mentioned before in your prior reposts. You haven't given us nearly enough information to help you.

It seems as though you are calling 1 stored procedure 3,000 times, or calling 3,000 stored procedures at the same time. Either way that is insane.

Your issue isn't infrastructure related, it is design related. You need to rethink the design of what it is you are trying to accomplish rather than just throwing more money at the problem in terms of hardware/resources.

Remember, we don't have access to your hard drive, your code, nor do we read minds or know anything about your project. You've stated your problem as though we have in depth knowledge of your issue/project and expect someone to offer meaningful suggestions. Until you take a step back and realize you probably need to rethink your SP, your going to run into this problem constantly


这篇关于如何扩展web api的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆