使用WebListener或OWIN作为Azure Service Fabric的API网关 [英] Using WebListener or OWIN as API Gateway for azure service fabric

查看:75
本文介绍了使用WebListener或OWIN作为Azure Service Fabric的API网关的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们在使用Kestrel作为服务器的服务架构中有4个无状态服务微服务.我们需要将这4个服务公开给前端,并对使用WebListener或OWIN作为服务器存在疑问.谁能说出哪个对性能更好.另外,我们还有用于处理令牌的身份验证服务.

We have 4 stateless services microservice in service fabrics which are using Kestrel as server. We need to expose those 4 services to the front end and have question regarding either to use WebListener or OWIN as server. Can any one tell which is better for performance. And also we have authentication service which is used to handle tokens.

推荐答案

通过OWIN,我假设您指的是

By OWIN I'm assuming you're referring to Katana with Web API 2, which both implement OWIN.

在这种情况下,实际上是在具有Katana的经典" Web API 2和具有WebListener的较新ASP.NET Core之间进行选择.由于某些原因,我总是建议将ASP.NET Core与WebListener配合使用:

In that case, the choice is really between "classic" Web API 2 with Katana and the newer ASP.NET Core with WebListener. I always recommend ASP.NET Core with WebListener for a few reasons:

  • We have official integration NuGet packages for ASP.NET Core in Service Fabric
  • These packages and their use cases are documented
  • Katana was largely a prototype for what would become ASP.NET Core. Most, if not all, new feature work is going into ASP.NET Core, not Katana, and ASP.NET Core is officially supported by Microsoft.

这篇关于使用WebListener或OWIN作为Azure Service Fabric的API网关的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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