In our typical production environment, Apache web server works as proxy to our application server like weblogic. I have question about load balancing. Both apache and web logic provide its own functionality of load balancing. If apache can balance the load, what is the use of web logic load balancer.
As mentioned in the oracle doc Load Balancing, there are many ways of doing load balancing for weblogic. Should you already have an Apache web server, it is better to use that instead of having Weblogic do the load balancing. The load balancer must typically be off the JVM because the should there be higher traffic, weblogic must have reserve resources for these incidents. Apache does load balancing very easily but weblogic requires more effort as it is an additional feature. Its basically like a boat in water and a car that can also float (the car being weblogic).
Related
I know fronting Tomcat by Apache has some security benefits when we are using aws classic load balancer. However, I was wondering if it is meaningful to front Tomcat by Apache http server, when we are using aws application load balancer? Because an application load balancer operates at Layer 7 of the OSI model, and deals with application-level content.
It depends on your intention. Fronting tomcat is not an issue when you go with AWS and ALBs are good way to handle and route your traffic. Therefore, stick to ALB rather than ELB and maintaining an Apache layer.
We use apache httpd load balancer for our project.
We were looking at Google Load balancer and may be shift to it.
But i dont find any comparison of both as in pro/con of one over another, so that we can decide on what suits as best.
Can we get a list of pro/con?
If scalability and performance is critical to you, definitely choose GCE load balancer. The traditional model of load balancing is basically "proxy + backends", in which the proxy quickly becomes the bottleneck. This is not the case for GCE load balancer, which has no proxy at all, the load balancing is implemented by the underlying infrastructure.
But GCE load balancer is not free, see pricing here https://cloud.google.com/compute/pricing#lb.
I have to create a system with JBoss in cluster modality with a load balancer using Apache HTTPD with mod_cluster.
I have configured the system correctly, and the load balancer see all nodes of the system. But, I have to create the web application for the load balancer now.
It has to be a servlet or a REST service that has a reference to a remote bean and make a lookup with JNDI? Or is something different?
Can someone provide to me a reference to a documentation/tutorial that explain that?
mod_cluster is a Apache module that does the HTTP(S) load balancing.
Read more here: http://mod-cluster.jboss.org/
The whole application is installed in JBoss mod_cluster just does the load balancing.
mod_cluster is just for load balancing. Just deploy the web app against the server group created. It gets deployed on master and slaves and can access the remote bean as required.
You can dig into our mod_cluster testing servlets on clusterbench/clusterbench or vastly simplified, lobotomized version.
All new documentation effort is accumulated on: http://modcluster.io
TL;DR
create any servlet application
deploy to your workers and it's good to go
if you want web sessions replicated in the cluster, add <distributable/> to your WEB-INF/web.xml
I am striving for a very simple cloud based architecture on Amazon AWS. I would like to have an app layer of several "elastic" EC2 instances where my application (and application servers) run, but I'm wondering what the load balancing will look like.
If I choose to use ELB, does it remove the need for Apache or Nginx?
No. All the loadbalancer does is just that, distributes load across instances. Whatever your stack is running on each instance will still need a nginx or apache or whatever service you want to respond back to the request routed through the load balancer.
I'm assuming you're running a web stack needing some type of server like nginx, apache, or java needing tomcat or something.
However, if you want AWS to take care of nginx and/or apache, look into running as a ElasticBeanstalk application: https://aws.amazon.com/elasticbeanstalk/
We currently run a SaaS application on apache which server ecommerce websites (its a store builder). We currently host over 1000 clients on that application and are now running into scalability issues (CPU going over 90% even on a fairly large 20 core 80GB ram + all SSD disk server).
We're looking for help from an nginx expert who can:
1. Explain the difference between running nginx as a web server vs. using it like a reverse proxy. What are the benefits?
2. We also want to use nginx as a load balancer (and have that already setup in testing), but we haven't enabled cacheing on the load balancer. So while its helping redirect requests, its not really serving any traffic directly and it simply passes through everything to one of the two apache servers.
The question is that we have a lot of user-generated content coming from the apache servers, how do we invalidate the cache for only certain pages that are being cached by nginx? If we setup a cron to clear this cache every 1 minute or so, it wouldn't be that useful... as cache would then be virtually non existent.
--
Also need an overall word on what is the best architecture to build for given the above scenarios.
Is it
NGINX Load Balancer + Cacheing ==> Nginx Web Server
NGINX Load Balancer ==> Nginx Web Server + Cacheing ?
NGINX Load Balancer + Cacheing ==> Apache Web Server
NGINX Load Balancer == > Apache Web Server (unlikely)
Please help!
Scaling horizontally to support more clients is a good option. Its recommended to first evaluate what is causing the bottleneck, memory within the application, long running requests etc.
Nginx Vs other web servers: Nginx is a HTTP server and not a servlet engine. Given that, you can check if it fits your needs.
It is a fast web server. You need to evaluate the benefits of using it as a single stand alone webserver against other web servers. Speed and memory could help.
Nginx as a load balancer:
You can have multiple web server instances behind nginx.
It supports load balancing algorithms like round robin, weighted etc so the load can be distributed based on the resource availability.
It helps in terminating ssl at Nginx, filter requests, modify headers,
compression, application upgrades wihtout downtime, serve cached content etc. This frees up resources on the server running the application. Also separation of concerns.
This setup is a reverse proxy and the benefits to it.
You can handle cache expiry with nginx. nginx documentaion has good details http://nginx.com/resources/admin-guide/caching/