我愿意在一台机器上托管一个应用程序,而不是根据我的预算在硬件级别进行任何故障转移或负载平衡。
但是,据我所知,由于tomcat的命中率增加,因此它有一个缺点。因此,为了摆脱这种情况,我想为同一个应用程序使用多个实例。所以要做到这一点,哪个负载均衡器会更好mod_jk或mod_proxy。您甚至可以建议任何其他开源工具来帮助我平衡应用程序命中率。
我的应用程序包含结构而不是弹簧,我的操作系统是rhel 6.x.请根据表现良好建议。
提前致谢。
答案 0 :(得分:1)
Running multiple instances of one application on the same machine only leads to the application sharing the resources - minus the overhead for the additional Tomcat instances and the loadbalancer.
This is pretty much the same as dividing cargo on individual tires because a car gets slow when it is too loaded. Staying in the picture: what you want is a turbocharger.
Translated that would be a reverse proxy cache.
I'd suggest using varnish. You can configure it to serve static resources like images and stylesheets from RAM after they were delivered the first time, reducing the requests passed to your application drastically.
It may be configured as a classical load balancer, too.