How to achieve high-performance REST API on Azure with .NET?

后端 未结 7 1734
Happy的楠姐
Happy的楠姐 2021-02-07 15:24

We have a .NET Web Role hosted on Windows Azure that only serves a REST API with only a hand few web methods.

API is u

7条回答
  •  南旧
    南旧 (楼主)
    2021-02-07 16:00

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

    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.

    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.

    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.

提交回复
热议问题