简体   繁体   English

是否可以在运行时配置 YARP?

[英]Is it possible to configure YARP during runtime?

I have a scenario where I would like to use YARP and be able to change the configuration (in this case the Address of a destination within a cluser) during runtime, is this possible?.我有一个场景,我想使用 YARP 并能够在运行时更改配置(在本例中为 cluser 中的目标地址),这可能吗?

The idea is that we have an application that runs as two instances.这个想法是我们有一个作为两个实例运行的应用程序。 Node1-For testing Node2-Production Node1-用于测试 Node2-生产

When we are done testing in Node1 and ready for release to Production, I would like to redirect all traffic to Node1, and make Node2 our testing-node.. and next time we do the samething but this time Node1 goes back to testing and Node2 gets set for Production.当我们在 Node1 中完成测试并准备好发布到生产环境时,我想将所有流量重定向到 Node1,并将 Node2 作为我们的测试节点。下次我们做同样的事情,但这次 Node1 返回测试,Node2设置为生产。

This scenario is fully possible to achive using YARP and by simply updating the appSettings.json, however.. I would really like to be able to do this dynamically using some sort of "internal" API of YARP.这种情况完全有可能使用 YARP 并通过简单地更新 appSettings.json 来实现,但是......我真的很想能够使用 YARP 的某种“内部”API 动态地做到这一点。 The idea is to expose this as a "REST-API" (HTTP-API/RPC) so we can switch between nodes using our CD-pipeline.我们的想法是将其公开为“REST-API”(HTTP-API/RPC),以便我们可以使用我们的 CD 管道在节点之间切换。

I have tried to google the.net, and also done a quick peek into the source-code of YARP, but cant really find anything that mentions that changing the configuration during runtime/dynamically would be possible, since everything appears to be "ReadOnly".. any ideas?我尝试在 google the.net 上搜索,也快速浏览了 YARP 的源代码,但真的找不到任何提到可以在运行时/动态更改配置的内容,因为一切似乎都是“只读” .. 有任何想法吗?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM