GCP 中的负载平衡是什么?
What is load balancing in GCP?
我在 Google Cloud Platform 的 Compute Engine 中使用 VM。当我创建实例时,google 告诉我,它会花费我一个价格(将近 5 美元),但实际上它会向我收取更多费用。
在详细的账单中,我发现,实例的成本约为每 2 周 2 美元,而负载平衡则多出 5 美元。
我知道什么是负载均衡(只是泛泛而谈),但如果我每次只使用 1 个 VM,它的用户在哪里?我真的需要它吗?我怎样才能避免它?
如您所述,GCE load balancers are useful to distribute the load between a set of instances. There are some other advantages they can provide like autoscaling。
如果您只使用一台 VM,您当然可以使用 external IP. The only thing to have in mind is that external IPs can change if they are defined as ephemeral. To avoid this scenario that would imply to re-configure your applications to the new IP, you can define it as an Static IP 将 VM 连接到 Internet。
^尽管热衷于静态 IP。除非您将使用它,否则不要保留。我在某处读到保留但未使用的静态 IP 地址将按每小时一美分或几分之一的价格收费
我在 Google Cloud Platform 的 Compute Engine 中使用 VM。当我创建实例时,google 告诉我,它会花费我一个价格(将近 5 美元),但实际上它会向我收取更多费用。
在详细的账单中,我发现,实例的成本约为每 2 周 2 美元,而负载平衡则多出 5 美元。
我知道什么是负载均衡(只是泛泛而谈),但如果我每次只使用 1 个 VM,它的用户在哪里?我真的需要它吗?我怎样才能避免它?
如您所述,GCE load balancers are useful to distribute the load between a set of instances. There are some other advantages they can provide like autoscaling。
如果您只使用一台 VM,您当然可以使用 external IP. The only thing to have in mind is that external IPs can change if they are defined as ephemeral. To avoid this scenario that would imply to re-configure your applications to the new IP, you can define it as an Static IP 将 VM 连接到 Internet。
^尽管热衷于静态 IP。除非您将使用它,否则不要保留。我在某处读到保留但未使用的静态 IP 地址将按每小时一美分或几分之一的价格收费