且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何实现高性能的REST API在Azure上使用.NET?

更新时间:2023-02-15 09:41:59

在您的POC,我想你可以从公式,你通过一些场景的测试中去掉Azure上。

In your POCs, I think you can remove Azure from the equation as you test through some of the scenarios.

如果这是真正的带宽,COM pression当然是一个选择,但它可能会产生问题,如果这个Web服务将被开辟为公共,而不是简单地使用你的控制之下的应用程序。这是在异源环境中尤其如此。

If this is truly bandwidth, compression is certainly an option, but it can be problematic if this web service will be opened up to the "public" rather than simply used by applications under your control. This is especially true in a heterogenous environment.

一个更简洁的格式是一种选择,只要你有REST风格的通信故障的一个很好的手段,由于恶劣的格式。 XML使这很容易。在protobuf的缺乏经验,但它似乎在这方面有一定的安全,因此,如果带宽是你的问题,可能解决问题解析的速度,它可能是一个非常好的选择。我首先POC它的Azure之外,然后把它放在

A less verbose format is an option, as long as you have a good means of RESTfully communicating failures due to bad formatting. XML makes this very easy. Lacking experience in ProtoBuf, it does appear to have some safety in this area, so it could be a very good option if bandwidth is your problem and may solve the speed of parsing issue. I would POC it outside of Azure first and then put it in.

如果你有证据WCF的开销是一个问题,我只会跑的原始HttpHandler的方向。 Azure是够硬,在配置这么多在于我不相信加生HttpHandlers的的附加问题是正确的方向去调试。

I would only run the raw HttpHandler direction if you have evidence WCF overhead is an issue. Azure is hard enough to debug with so much being in config that I am not convinced adding the additional issue of raw HttpHandlers is the proper direction to go.