w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML Categories
What method(s) do I use to configure/update an Elastic Load Balancer via Java?
My bad. Forgot to execute the requests against the ELB variable. The code below creates the health check and assigns the instances associated with the ELB. Hope this helps the next person asking this question. ConfigureHealthCheckResult healthResult = myELB.configureHealthCheck(healthCheckReq); RegisterInstancesWithLoadBalancerResult registerResult = myELB.registerInstancesWithLoadBalancer(regInst);

Categories : Java

how to configure Elastic Beanstalk to deploy code to an instance but not add it to the load balancer
For the most part, though not straight forward, you could provide a .config file in .ebextensions to run your script files. This example of speeding up a deploy shows running some scripts and moving data back and forth. Better yet, the author describes the sequence and deployment process. I'm just embarking on this type of container customization. I have read of others dropping files in the /opt/elasticbeanstalk/hooks/appdeploy/pre and /opt/elasticbeanstalk/hooks/appdeploy/post directories, much of which can be derived by reading the post linked above. Also note that you can include the content of a script in the yaml .config file such as this which I found yesterday: files: "/opt/elasticbeanstalk/hooks/appdeploy/post/99_restart_delayed_job.sh": mode: "000755" owner: root

Categories : Ruby On Rails

Elastic Beanstalk's Elastic Load Balancer name
Unfortunately the answer is no to the first 2. The last one, you are able to do it, but it more or less goes against the flow of Elastic beanstalk. You would need to create your own ELB with whatever name you like and then put it in front ot the instance that is created by beanstalk. You would need need to delete the ELB that beanstalk created so that it's not sitting there costing you money. I can't remember if beanstalk boots its environments via an AutoScaling group, but if it does, you'll need to associate that AutoScaling group with your new ELB. After creating and syncing all of that up, you need to point your CNAME to your new custom made ELB. That should work.

Categories : Amazon

aws elastic load balancer not distributing
You need to have the route53 domain direct traffic to the ELB. If you have example.com and are trying to route that to the load balancer you need to associate the apex with the load balancer. To do this, go to the route53 tab. Click your hosted zone and go to record sets. then create a new zone and click yes for alias You then need to associate the hosted zone with your ELB. Now to get the traffic to fail over correctly you need to be running both instances behind the load balancer (preferably in multiple availability zones) and the ELB will take care of the failover. To do this, go to the elb section of ec2. Click your load balancer and add instances to it.

Categories : Amazon

Why am I getting a 502 bad gateway when sending a redirect from behind amazon elastic load balancer?
It turns out that ELB is very picky about what it considers a 'valid' response and will return 502 Bad Gateway if it isn't happy. I fixed it by making sure the response from my server had the following headers: eg. if I was listening at http://example.com I send back the following response: HTTP/1.1 301 Moved Permanently Content-Type: */*; charset="UTF-8" Location: https://example.com/ Content-Length: 0 This makes ELB happy and everything works. For interest, here's the code (Java, using Simpleframework): private static void startHttpsRedirector() throws IOException { org.simpleframework.http.core.Container container = new org.simpleframework.http.core.Container() { @Override public void handle(Request request, Response response) { Path path = reques

Categories : Http

Secure a specific page by client IP behind AWS Elastic Load Balancer
The client IP is actually being passed via header (X-Forwarded-For). This header may include other load balancer IPs in addition to the client IP. If you can configure filtering based on headers, you should be able to do what you are attempting to do.

Categories : Asp Net

Amazon Elastic Load Balancer (ELB) url not resolved by instance attached to it
This is normal, if I correctly understand your testing framework. The way that ELB is scaling, it starts out running on a very small machine, and as traffic increases, it's directed to even larger and larger machines. However, ELB is not configured to handle flash traffic, especially from a small number of hosts, as is the case with a load testing scenario. This is because the DNS record is changed whenever ELB scales, and it sometimes takes a while to propagate. Load testing frameworks sometimes cache the DNS lookup, making things even slower. The official ELB documentation (http://aws.amazon.com/articles/1636185810492479) states that traffic should not be increased by more than 50% every 5 minutes. I found that scaling takes even longer if you're looking to get over 150-200k RPM.

Categories : Wcf

Running nginx infront of a unicorn or gunicorn under Elastic Load Balancer
In a word: yes. Amazon's ELB service is wonderful, but it is solely a load balancer. Running nginx on your own server gives you a locus of control and a place to do rewrites, redirects, compression, header munging, caching, and more. Furthermore it allows you to serve static files in the fastest possible way, rather than using a slot on your more heavyweight appserver.

Categories : Nginx

How to simulate Amazon's 60 sec timeout on Elastic Load Balancer (ELB) on a local xAMP environment?
This timeout has to do with a request taking more than 60 seconds, without sending any data as a response. Long HTTP requests like this should really be avoided. Even browsers may give up if they dont receive any response within a timeout period. If you can't get rid of long HTTP requests and you need to simulate it. You can use an fcgi/php-fpm configuration of php and provide a timeout of 60 seconds for which the fcgi process will wait for PHP to respond.

Categories : Apache

Amazon web service load balancer unable to balance the load equally
There could be a number of reasons for this. Its without doing more digging, its hard to know which one you are experiencing. Sticky sessions can result in instances traffic becoming unbalanced. Although this depends heavily on usage patterns and your application. Cached DNS resolution. Part of how the ELB works is to direct traffic round robin on a DNS level. If a large number of users are all using the same DNS system provided by an ISP, they might all get sent to the same zone. Couple this with sticky sessions and you will end up with a bunch of traffic that will never switch. Using Route 53 with ALIAS records may reduce this somewhat. If you can't get the ELB to balance your traffic better, you can set up something similar with vanish cache or other software load balancer. Not as c

Categories : Amazon

How do I configure mongodb replicaset using elastic IP's in EC2?
You should never use an Elastic IP for internal traffic like replication. You will be charged $0.01/GB for this traffic, whereas using the internal IP would be free. If you're using something like replica sets, you really should be running in a VPC. Unlike normal EC2 instances, instances in an VPC keep the same private IP addresses and Elastic IP addresses even when stopped.

Categories : Mongodb

Camel and load balancer
If you need to have that setup so that each server might receive the same record - then you need an idempotent route. And you need to make sure your idempotent repository is the same between your machines. Using a database as the repository is an easy option. If you do not have a database, a hazelcast repo might be an option. What can be an issue is to determine what is unique in your records - such as an order number or customer + date/time or some increasing transaction ID number.

Categories : Apache

load balancer won't remove itself from dns
When I nslookup your domain I get app-lb-west-650828891.us-west-2.elb.amazonaws.com: DNS server handling your query: localhost DNS server's address: 127.0.0.1#53 Non-authoritative answer: Name: codepen.io Address: 54.245.121.59 It is possible that the DNS change just needed a little time to propagate.

Categories : Amazon

What to care about when using a load balancer?
The biggest issue that you are going to run into is going to be related to php sessions. By default php sessions maintain state with a single server. When you add the second server into the mix and start load balancing connections to both of them, then the PHP session will not be valid on the second server that gets hit. Load balancers like haproxy expect a "stateless" application. To make PHP stateless you will more than likely need to use a different mechanism for your sessions. If you do not/can not make your application stateless then you can configure HAProxy to do sticky sessions either off of cookies, or stick tables (source IP etc). The next thing that you will run into is that you will loose the original requestors IP address. This is because haproxy (the load balancer) termina

Categories : PHP

WCF security with load balancer
The client and server binding will be different. The client binding will use username auth in eitehr message or transport level with transport security (ssl): <bindings> <basicHttpBinding> <binding name="NewBinding0"> <security mode="Message" /> </binding> </basicHttpBinding> </bindings> then the server config will use the same config but without the transport security. If you chose to use message security then check out WCF ClearUsernameBinding. If you use trasnport security (basic http) then set mode="TransportCredentialOnly".

Categories : Wcf

Using Laravel behind a load balancer
We use a load balancer where I work and I ran into similiar problems with accessing cPanel dashboards where the page would just reload every time I tried accessing a section and log me off as my IP address was changing to them. The solution was to find which port cPanel was using and configure the load balancer to bind that port to one WAN. Sorry, I am not familiar with laravel and if it just using port 80 then this might not be a solution.

Categories : PHP

Load Balancer between 5 network cards
There are several ways to do this and are all relatively easy. A VERY simple solution is to simply bind mssql to all 5 interfaces and give all interfaces a different network address. You can then configure some clients to point to one interface, others to the next etc. Depending on your network infrastructure you can also "bond" your network interfaces together so that they act like 1 interface on the OS. If you have a single switch and all of the interfaces are plugged into the single switch then bonding is an option. If they are plugged into two different switches then your switches will have to support lacp or something similar. You can also look at using a load balancer infront of your sql server. This could be problematic depending on your database, replication, sticky sessions etc.

Categories : Sql Server

Configuring Apache Load Balancer
Make sure you follow the advice in section stickyness: ProxyPass / balancer://mycluster stickysession=JSESSIONID|jsessionid scolonpathdelim=On (not only for the /test directory) Furthermore, for the JBoss application server, you need to supply route=web1 / route=web2 etc. in the Apache config and furthermore jvmRoute="web1" in the JBoss configuration of the <Engine name="jboss.web"... element (the location depends on the JBoss version you are using, for v4.2 it is server/default/deploy/jboss-web.deployer/server.xml) See also this tutorial

Categories : Apache

Can I use Amazon ELB instead of nginx as load balancer for my Node.Js app?
Yes, but there are a few gotcha to keep in mind: If you have a single server, ensure you don't return anything except 200 to the page that ELB uses to check health. We had a 301 from our non-www to www site, and that made ELB not send anything to our server because of it. You'll get the ELB's IP instead of the client's in your logs. There is an ngx_real_ip module, but it takes from config hacking to get it to work.

Categories : Node Js

Setting a trace id in nginx load balancer
In our production environment we do have a custom module like this. It can generate a unique trace id and then it will be pushed into http headers which send to the upstream server. The upstream server will check if the certain field is set, it will get the value and write it to access_log, thus, we can trace the request. And I find an 3rd party module just looks the same: nginx-operationid, hope it is helpful.

Categories : Nginx

AWS : S3FS AMI and load balancer high I/O Issue
I would like to recommend to take a look at the new project RioFS (Userspace S3 filesystem): https://github.com/skoobe/riofs. This project is “s3fs” alternative, the main advantages comparing to “s3fs” are: simplicity, the speed of operations and bugs-free code. Currently the project is in the “testing” state, but it's been running on several high-loaded fileservers for quite some time. We are seeking for more people to join our project and help with the testing. From our side we offer quick bugs fix and will listen to your requests to add new features. Regarding your issue: I'm not quite sure how does S3FS works with cached files, but in our project we try to avoid performing additional I/O operation. Please give it a try and let me know how RioFS works for you !

Categories : Amazon

How to get the actual URL in case of load balancer proxy server
I'm assuming you are using mod proxy (mod_jk/mod_ajp preserves the proxy host) Retrieve the "X-Forwarded-Host" header from request, which is the original host requested by the client. See http://httpd.apache.org/docs/2.2/mod/mod_proxy.html

Categories : Java

How to make restfull service truely Highly Available with Hardware load balancer
70-80 servers is a very horizontally scaled implementation... good job! Better is a very relative term, hopefully one of these suggestions count as "better". Implement an intelligent health check for the application with the ability to adjust the health check while the application is running. What we do is have the health check start failing while the application is running just fine. This allows the load balancer to automatically take the system out of rotation. Our stop scripts query the load balancer to make sure that it is out of rotation and then shuts down normally which allows the existing connections to drain. Batch multiple groups of systems together. I am assuming that you have 70 servers to handle peak load. This means that you should be able to restart several at a time. A st

Categories : Rest

nginx as load balancer server out 404 page based on HTTP response from app server
Simply set the proxy_intercept_errors option to on and create an nginx error page for it. error_page 404 /404.html; proxy_intercept_errors on; To ensure that nginx will serve the static file from it’s document root you also have to specify the following: location /404.html { internal; } I'm assuming here that nginx is configured to talk with your app servers as proxy, because that is the usual way and your question does not mention any of this.

Categories : Nginx

How to properly load and configure Spring beans from an external utility jar
Two approaches by which you can solve this : (Please include the dependency as part of pom.xml) To manually include only the required utility beans into this new application-context.xml with the path referring to those class paths. That's the beauty of spring to create the selective bean only. Have a properties file (Include this in the new application-context.xml) <context:property-placeholder location="WEB-INF/utility.properties"/> <import resource="${application.path.of.utility.jar}"/> And define path ao the utility jar application.path.of.utility.jar=/utility/jar/path/application_context.xml

Categories : Java

Can I configure an entity to eager load a relation using an EntityTypeConfiguration object?
There is no configuration for eager loading. You always have to call the Include method. For example in a helper method. return this.Employer.Include(e => e.EmployeeParams);

Categories : Entity Framework

Scaling only with AWS EC2 with Elastic Load Balancing and Auto-Scaling
ELB will pass through TCP and HTTP, you just need to set the ports you want. Autoscaling will scale the servers based on a set of parameters. So yes - you can - provided that your server can handle multiple instances of itself.

Categories : Amazon

How do I configure a POST route in Play Framework v1.2.7 with a dynamic id attribute that will load a JPA entity
There is an example in the play documentation which shows an approach to your question: http://www.playframework.com/documentation/1.2.7/jpa#save (the seconde code snippet in this chapter) You need a route (like you suggested in your second approach), where you just pass the id of the model you want to edit: POST /users/{id} Application.saveUser() The according action method could look like this: public static void save(Long id) { User user = User.findById(id); // here you load the entity you want to edit by it's id user.edit("user", params.all()); // here the entity will be edited validation.valid(user); if(validation.hasErrors()) { edit(id); } else{ user.save(); // explicit save here show(id); } }

Categories : Java

How to make a post background semi-transparent without making the content transparent?
Use RGBa (Red Green Blue Alpha) background-color: rgba(255,255,255,0.5); So your code would be #left-column .post { z-index: -1; background-color: rgba(255,255,255,0.5); border: 1px solid #ccc; border-radius: 5px; -moz-border-radius: 5px; -webkit-border-radius: 5px; float: left; padding-top: 20px; width: 520px; }

Categories : HTML

HTML CSS - Best practice for making div wrappers semi-transparent with inner text not transparent
Your choices are limited. Using RGBA on the container div is one of the cleaner ways if you can. Otherwise, remove the text from the container and layer them so they just appear that it is contained within the container. It would have been nice if CSS would allow opacity: 2 for the child, or allow overriding the opacity from children, but it doesn't.

Categories : HTML

How to create fully transparent window which has not transparent content?
I think you start point should be with taking a look on Layered Windows http://msdn.microsoft.com/en-us/library/ms997507.aspx it is most common way for playing with custom shape and (semi)transparent windows. UPD. There is also old API for making custom shaped windows: int SetWindowRgn( HWND hWnd, HRGN hRgn, BOOL bRedraw );

Categories : C++

Click through transparent area on partially transparent image
try this <p> text tag give position:relative; and image give position:absolute; http://jsfiddle.net/YDkkg/2/ CSS p { position: relative; z-index: 0; } .triangle { width: 0px; height: 0px; border-style: solid; border-width: 0 100px 100px 100px; border-color: transparent transparent #e00f19 transparent; position: absolute; z-index: 1; text-align: center; } OR if you using image .png please use below css i think so if usefull to you. p{ position:relative; z-index:0; } img{ position:absolute; z-index:1; }

Categories : Javascript

Android make a view transparent, or at least semi transparent
try to refer it to drawable shape as bellow : android:background="@drawable/transparant_layout" transparant_layout: <?xml version="1.0" encoding="utf-8" ?> <shape xmlns:android="http://schemas.android.com/apk/res/android"> <solid android:color="#00000000" /> </shape> Hope this help.

Categories : Java

make border non transparent if div is transparent
Try this: div { background-color: rgba(0, 0, 0, .5); // or transparent border-color: #fff; } EDIT: You can use this solution: <div class="border_div"> <div class="content_div"> your content here </div> </div> .border_div { border: 5px solid #fff; } .content_div { opacity: .86; }

Categories : HTML

TFS 2012 Configure Features Error - Unable to configure Planning Tools
Try this: Rename your User Story to "Product Backlog Item". Set the Initial State of you "Bug" to "Active". Try the Upgrade Rename your User Story Type back to "User Story". Remove the "Active" Initial State. Export your Common Process Config and add in your "Proposed" State into the Bug Configuration (see below). Import your Common Process Config. Example BugWorkItems <BugWorkItems category="Microsoft.BugCategory"> <States> <State type="Proposed" value="Proposed" /> <!-- more --> </States> </BugWorkItems>

Categories : Tfs

Any way configure to configure visual studio mvc build views release mode
Are you specifically setting something to compile the views like the Razor Generator? (http://razorgenerator.codeplex.com/) If not views in MVC are not compiled.

Categories : Asp Net Mvc

Mongodb balancer move failed: chunk too big to move. But it's not
Looks like as known old bug https://jira.mongodb.org/browse/SERVER-9365 I have 30MB chunks about 280K docs. And mongo can not move it becouse it contain more then 250001 docs and fill error "chunk too big to move". We have situation that chuk not to big to split, and "not to small" to move. I reproduced that localy. I created collection of 1 chunk with 36b docs (8.58MiB per chunk). If docs is 250001 or less chunk moved manualy as expected. If docs 250002 or more I got a error "chunk too big to move". Chunk size in settings 64MB. Work arround: If you planed use collection with small docs - pre-split collection so that the documents were less then 250K.

Categories : Mongodb

How to Flash CS5 AS3 Random Elastic?
Something like this ? var properties:Array = ['rotationX', 'rotationY', 'rotationZ', 'rotation']; var eases:Array = [Elastic.easeIn, Elastic.easeInOut, Elastic.easeOut, Bounce.easeIn, Back.easeOut]; function completeHandler(event:Event):void { uiLoader.x = (back.width - uiLoader.content.width) >> 1; uiLoader.y = (back.height - uiLoader.content.height) >> 1; new Tween(mc, getRandom(properties), getRandom(eases), 90, 0, 4, true); } function getRandom(array:Array):* { return array[Math.floor(Math.random() * array.length)]; } EDIT : I had a look at the doc (I usualy use greensock's tweens). You should to: http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/fl/transitions/Tween.html I edited the code.

Categories : Actionscript

How do you connect to AWS Elastic Transcoder?
To connect to a specific region in boto, you can use: import boto.elastictranscoder transcode = boto.elastictranscoder.connect_to_region('us-west-2') transcode.create_job(...)

Categories : Python

AWS Elastic Beanstalk and Composer
Composer is already installed default in Beanstalk's PHP AMI. Also consider that container_commands are ran through '/var/app/ondeck' and not on current. Try something like this: container_commands: 01-install-packages: command: "composer.phar install -d /var/app/ondeck/www"

Categories : Amazon



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.