VPC如何保护API网关后面的微服务?

发布于 2025-02-13 19:56:20 字数 384 浏览 1 评论 0原文

我可以使用一些建议……我认为我可能在这里缺少一些明显的建议,但是我试图了解使用API​​网关或BFF网络模式时的微服务如何通信。每个微服务显然也具有API,那么它们如何比API网关易于访问?当然,他们也有HTTP终点吗?虚拟网络如何将微服务仅从API网关访问?这有意义吗?我在网上发现的所有教程似乎都假设我了解!我很困惑。

微服务网络图

“在此处输入图像描述”

I could use some advice… I think I might be missing something obvious here but I’m trying to understand how microservices communicate when using the API gateway or BFF networking pattern. Each of the microservices will obviously have an API as well, so how are they any less accessible than the API gateway? Surely they have HTTP endpoints as well? How does a virtual network limit the microservices to only being accessible from the API gateway? Does that make sense? All the tutorials I find online seem to assume I understand! I’m confused.

Microservices network diagram

enter image description here

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

旧人哭 2025-02-20 19:56:21

VPC中的微服务具有专用IP地址,仅在该VPC中直接路由。它们在互联网上根本不可用,除非您明确向它们提供公共IP,或者通过其他方式,例如API网关,带有分配的公共IP,Transit Gateway等的负载平衡器。VPC

中的资源也可以被分配给安全组,这些安全组可以很好地控制哪些IP地址可以在哪些端口上与它们进行通信。

Microservices in your VPC have private IP addresses that are only directly routable within that VPC. They are not available on the internet at all, unless you explicitly provide them with a public IP, or via another way in, like an API gateway, load balancer with an assigned public IP, transit gateway, etc.

Resources in your VPC can also be assigned to security groups that provide fine control over which IP addresses are allowed to communicate with them on which ports.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文