load-balancing

Difference between session affinity and sticky session?

馋奶兔 提交于 2019-11-27 16:46:58
What is the difference between session affinity and sticky session in context of load balancing servers? Lou Franco I've seen those terms used interchangeably, but there are different ways of implementing it: Send a cookie on the first response and then look for it on subsequent ones. The cookie says which real server to send to. Bad if you have to support cookie-less browsers Partition based on the requester's IP address. Bad if it isn't static or if many come in through the same proxy. If you authenticate users, partition based on user name (it has to be an HTTP supported authentication mode

Load balancing with node.js using http-proxy

我的未来我决定 提交于 2019-11-27 16:20:12
问题 I'm trying to code a loadbalancing with node.js and http-proxy. I want a loadBalancer which share incoming request treatment between 2 servers. var http = require('http'), httpProxy = require('http-proxy'); var servers = [{host :'127.0.0.1', port :3000}, {host : 'remote_adr',port :3000}]; httpProxy.createServer(function (req, res, proxy) { var target = servers.shift(); proxy.proxyRequest(req, res, target); servers.push(target); }).listen(8000); I thought that doing this, it would have made a

Creating a HTTP load balancer in Google Cloud Platform

扶醉桌前 提交于 2019-11-27 13:20:38
问题 HTTP load balancer in GCP has lot of moving parts like global forwarding rules, target proxies, URL map, backend services and instance groups. Since I found difficult in setting up my HTTP load balancer, I have written the below answer that aggregates the steps for setting up HTTP load balancer in GCP. This question is a part of another question's answer, which is about building an autoscaled and load-balanced backend. 回答1: At first, GCP offers two types of load balancer, namely the Network

How can I modify the Load Balancing behavior Jenkins uses to control slaves? [closed]

流过昼夜 提交于 2019-11-27 12:31:23
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 5 months ago . We use Jenkins for our CI build system. We also use 'concurrent builds' so that Jenkins will build each change independently. This means we often have 5 or 6 builds of the same job running simultaneously. To accommodate this, we have 4 slaves each with 12 executors. The problem is that Jenkins doesn't really

What is the best way to handle sessions for a PHP site on multiple hosts? [closed]

浪子不回头ぞ 提交于 2019-11-27 12:25:31
PHP stores its session information on the file system of the host of the server establishing that session. In a multiple-host PHP environment, where load is unintelligently distributed amongst each host, PHP session variables are not available to each request (unless by chance the request is assigned to the same host -- assume we have no control over the load balancer). This site, dubbed "The Hitchhikers Guide to PHP Load Balancing" suggests overriding PHPs session handler and storing session information in the shared database. What, in your humble opinion, is the best way to maintain session

Avoid nginx decoding query parameters on proxy_pass (equivalent to AllowEncodedSlashes NoDecode)

走远了吗. 提交于 2019-11-27 10:22:05
问题 I use nginx as a load balencer in front of several tomcats. In my incoming requests, I have encoded query parameters. But when the request arrives to tomcat, parameters are decoded : incoming request to nginx: curl -i "http://server/1.1/json/T;cID=1234;pID=1200;rF=http%3A%2F%2Fwww.google.com%2F" incoming request to tomcat: curl -i "http://server/1.1/json/T;cID=1234;pID=1200;rF=http:/www.google.com/" I don't want my request parameters to be transformed, because in that case my tomcat throws a

Load balance web application

我与影子孤独终老i 提交于 2019-11-27 10:10:30
问题 There are load balanced tomcat web servers. Every request could be served by different tomcat server. How could we take care of this while writing code for the j2ee (struts) based web application? 回答1: First of all, you'll want to set up your load balancer for session affinity/sticky sessions, so that it continues forwarding all requests to the same Tomcat (as long as it is up) based on JSESSIONID. The Tomcat clustering doc states two important requirements for your application to

How can I use Spring Security without sessions?

家住魔仙堡 提交于 2019-11-27 10:05:56
I am building a web application with Spring Security that will live on Amazon EC2 and use Amazon's Elastic Load Balancers. Unfortunately, ELB does not support sticky sessions, so I need to ensure my application works properly without sessions. So far, I have setup RememberMeServices to assign a token via a cookie, and this works fine, but I want the cookie to expire with the browser session (e.g. when the browser closes). I have to imagine I'm not the first one to want to use Spring Security without sessions... any suggestions? In Spring Security 3 with Java Config , you can use HttpSecurity

Loadbalancing web sockets

霸气de小男生 提交于 2019-11-27 08:59:59
问题 I have a question about how to load balance web sockets. I have a server which supports web sockets. Browsers connect to my site and each one opens a web socket to www.mydomain.com . That way, my social network app can push messages to the clients. Traditionally, using just HTTP requests, I would scale up by adding a second server and a load balancer in front of the two web servers. With web sockets, the connection has to be directly with the web server, not the load balancers, because if a

SSL and Load Balancing

为君一笑 提交于 2019-11-27 05:33:52
问题 What affect does SSL have on the way load balancing works? I know that you need to use sticky sessions if you have chosen to not store you session info in the DB or Out of Process but how does that effect SSL? 回答1: Just to clarify, the SSL/TLS sessions have nothing to do with the HTTP sessions. (Some implementations may use the SSL/TLS session ID as a basis for maintaining HTTP sessions, but this is a bad design, as SSL/TLS may change sessions completely independently what HTTP is doing). In