齿轮的高效使用——OpenShift

Efficient use of gears - OpenShift

我必须部署一个 Java EE 应用程序,并且正在为其使用 Openshift。 因为我是新手所以我想问一下 - 我如何有效地使用 OpenShift gears。 - 负载平衡器是否单独分配一个齿轮或如何分配? - 是否建议对 3 个齿轮进行缩放? 提前谢谢你。对不起,如果问了一些愚蠢的问题。谢谢

您需要的信息可以在 Openshift 文档中找到 - https://developers.openshift.com/en/managing-scaling.html#creating-a-scalable-application。一开始HAProxy会运行连同webapp在一档,但是一到三档HAProxy就会占满整机。或者引用文档:

The first web gear in a scaling application has HAProxy installed, but also your web application. Once you scale to 3 gears, the web gear that is collocated with HAProxy is turned off, to allow HAProxy more resources to route traffic. Here’s a diagram of your scalable app. If you scale down back to 2 gears or less, the web cartridge on your first gear is started again.

缩放在您的情况下是否有意义取决于您的用例以及您是否也使用其他墨盒(如数据库),它们也会有自己的装备。您很可能会通过缩放获得收益,但很难说 w/o 具体细节。