load-balancing

Scaling with sticky sessions and websockets

爷,独闯天下 提交于 2019-12-04 11:58:17
问题 Initially we have two AWS EC2 instances with node.js running behind a load balancer with sticky sessions. As the load increases more instances are added. But we are facing problems with this approach. As out application is mainly for workshops, the load usually increases within a short period of time (workshop start) and every workshop participant has a sticky session with the first two instances and the new ones have almost none. Because of this the performance stays bad. First thought was:

Difference between pool and cluster

北城以北 提交于 2019-12-04 10:48:55
问题 From a purest perspective, they kind of feel like identical concepts. Both manage sets of reosurces/nodes and control their access from or by external components. With a pool, you borrow and return these resources/nodes to and from the pool. With a cluster, you have a load balancer sitting in front of the resources/nodes and you hit the load balancer with a request. In both cases you have absolutely no control over which resource/node your request/borrow gets mapped to. So I pose the question

Request.UserHostAddress return IP address of Load Balancer

ぐ巨炮叔叔 提交于 2019-12-04 09:37:43
问题 I have a critical line of code in my site that worked in our development environment but not on production. Well, I say it worked in development but the truth is it gave ::1 , which is the IPv6 loopback address. Anyway, what I wanted to do was capture the IP address of the user who came to the site. I therefore, used Request.UserHostAddress to do that. On development, as I said, it gave me the loopback address, which is correct, since I was running the site from my machine. On live it did

How to tell uWSGI to prefer processes to threads for load balancing

﹥>﹥吖頭↗ 提交于 2019-12-04 09:27:25
问题 I've installed Nginx + uWSGI + Django on a VDS with 3 CPU cores. uWSGI is configured for 6 processes and 5 threads per process. Now I want to tell uWSGI to use processes for load balancing until all processes are busy, and then to use threads if needed. It seems uWSGI prefer threads, and I have not found any config option to change this behaviour. First process takes over 100% CPU time, second one takes about 20%, and another processes are mostly not used. Our site receives 40 r/s. Actually

Get Client IP address using WCF 4.5 RemoteEndpointMessageProperty in load balancing situation

ぐ巨炮叔叔 提交于 2019-12-04 08:47:15
I have hosted WCF 4.5 Restful service in IIS and I am trying to use RemoteEndpointMessageProperty to get the IP address of the client who consumes the service. Code 1: private string GetClientIP() { OperationContext context = OperationContext.Current; MessageProperties prop = context.IncomingMessageProperties; RemoteEndpointMessageProperty endpoint = prop[RemoteEndpointMessageProperty.Name] as RemoteEndpointMessageProperty; string ip = endpoint.Address; return ip; } Code 2: private string GetClientIP() { string retIp = string.Empty; OperationContext context = OperationContext.Current;

How is load balancing done in Docker-Swarm mode

与世无争的帅哥 提交于 2019-12-04 08:05:07
问题 I'm working on a project to set up a cloud architecture using docker-swarm. I know that with swarm I could deploy replicas of a service which means multiple containers of that image will be running to serve requests. I also read that docker has an internal load balancer that manages this request distribution. However, I need help in understanding the following: Say I have a container that exposes a service as a REST API or say its a web app. And If I have multiple containers (replicas)

How Can I use Apache to load balance Marklogic Cluster

空扰寡人 提交于 2019-12-04 07:52:58
Hi I am new to Marklogic and Apache. I have been provided task to use apache as loadbalancer for our Marklogic cluster of 3 machines. Marklogic cluster is currently running on Linux servers. How can we achieve this? Any information regarding this would be helpful. You could use mod_proxy_balancer . How you configure it depends what MarkLogic client you would like to use. If you would like to use the Java Client API , please follow the second example here to allow apache to generate stickiness cookies. If you would like to use XCC, please configure it to use the ML-Server-generated or backend

How to verify Azure Load Balancer?

走远了吗. 提交于 2019-12-04 07:10:44
I want to be able to configure the Azure Load Balancer Emulator in such a way that two consecutive calls to the web app will always result in calls to different instances. How am i able to perform that? How can i verify that the load balancer is working as expected? Using the HttpContext.Current.Request.Url and seing if the endpoint port changes? Thanks in advance AvkashChauhan The default Load Balancer which are available to your Windows Azure Web and Worker roles are software load balancers and not so much configurable however they do work in Round Robin setting. If you want to test this

Orchard CMS on Load Balanced web servers

浪子不回头ぞ 提交于 2019-12-04 05:27:11
I'm considering running Orchard CMS on load balanced servers. (Two web servers with hardware load balancers, and a SAN file share) I've been unable to find any info on this. I'm wondering if there will be update and cacheing issues - if pages are cached, will updates be propagated to the other server? I'm also wondering if there are likely to be any install pitfalls? Does anyone have any info or experience on this? Many thanks.... You will need to define a machine key: http://orchardproject.net/docs/Setting-up-a-machine-key.ashx Other than that, if all the servers are working off the same

how to dispatch network requests to the (geographically) closest server

喜夏-厌秋 提交于 2019-12-04 05:09:05
I'm a Java coder and not very familiar with how networks work (other than basic UDP/TCP connections) Say I have servers running on machines in the US, Asia, Latin America and Europe. When a user requests a service, I want their request to go to the server closest to them. Is it possible for me to have one address: mycompany.com, and somehow get requests routed to the appropriate server? Apparently when someone goes to cnn.com, they receive the pictures, videos, etc. from a server close to them. Frankly, I don't see how that works. By the way, my servers don't serve web pages, they serve other