Tuesday, July 14, 2015

Setting Up Web Servers Load Balancing Using ‘POUND’ on RHEL/CentOS

http://www.tecmint.com/setting-up-pound-web-server-load-balancing-in-linux/

POUND is a load balancing program developed by ITSECURITY Company. It is a lightweight open source reverse proxy tool which can be used as a web-server load balancer to distribute load among several servers. There are several advantages POUND gives to end user which are very convenient and does the job right.
  1. Supports virtual hosts.
  2. Configurable.
  3. When a backend server is failed or recovered from a failure, it detects it automatically and bases its load balancing decisions according to that.
  4. It rejects incorrect requests.
  5. No specified browser or webservers.
Let’s have a look at how can get this hack done.
First of all you will need a scenario for better understanding about getting this done. So I will use a scenario where there are two webservers and one gateway server which needs to balance the requests comes to gateway server to webservers.
Pound Gateway Server : 172.16.1.222
Web Server 01 : 172.16.1.204
Web Server 02 : 192.168.1.161
Install Pound Load Balancer in Linux
Pound Web Server Load Balancer

Step1: Install Pound Load Balancer on Gateway Server

1. The easiest way to install Pound is using pre-compiled RPM packages, you can find RPMs for RedHat based distributions at:
  1. http://www.invoca.ch/pub/packages/pound/
Alternatively, Pound can be easily installed from the EPEL repository as shown below.
# yum install epel-release
# yum install Pound
After Pound installed, you can verify whether it is installed by issuing this command.
# rpm –qa |grep Pound
Install Pound Load Balancer
Install Pound Load Balancer
2. Secondly, you need two web-servers to balance the load and make sure you have clear identifiers in order to test the pound configuration works fine.
Here I have two servers bearing IP addresses 172.16.1.204 and 192.168.1.161.
For ease of use, I have created python SimpleHTTPServer to create an instant webserver on both servers. Read about python SimpleHTTPServer
In my scenario, I have my webserver01 running on 172.16.1.204 through port 8888 and webserver02 running on 192.168.1.161 through port 5555.
Pound Webserver 1
Pound Webserver 1
Pound Webserver 2
Pound Webserver 2

Step 2: Configure Pound Load Balancer

3. Now it’s time to make the configurations done. Once you have installed pound successfully, it creates the pound’s config file in /etc, namely pound.cfg.
We have to edit the server and backend details in order to balance the load among the webservers. Go to /etcand open pound.cfg file for editing.
# vi /etc/pound.cfg
Make the changes as suggested below.
ListenHTTP
    Address 172.16.1.222
    Port 80
End

ListenHTTPS
    Address 172.16.1.222
    Port    443
    Cert    "/etc/pki/tls/certs/pound.pem"
End

Service
    BackEnd
        Address 172.16.1.204
        Port    8888
    End

    BackEnd
        Address 192.168.1.161
        Port    5555
    End
End
This is how my pound.cfg file looks like.
Configure Pound Load Balancer
Configure Pound Load Balancer
Under the “ListenHTTP” and “ListenHTTPS” tags, you have to enter the IP address of the server you have installed POUND.
By default a server handles HTTP requests though port 80 and HTTPS requests through port 443. Under the “Service” tag, you can add any amount of sub tags called “BackEnd”. BackEnd tags bears the IP addresses and the port numbers which the webservers are running on.
Now save the file after editing it correctly and restart the POUND service by issuing one of below commands.
# /etc/init.d/pound restart 
OR
# service pound restart
OR
# systemctl restart pound.service
Start Pound Load Balancer
Start Pound Load Balancer
4. Now it’s time to check. Open two web browsers to check whether our configurations work fine. In the address bar type your POUND gateway’s IP address and see what appears.
First request should load the first webserver01 and second request from the other web browser should load the second webserver02.
Check Pound Load Balancing
Check Pound Load Balancing
Furthermore, think of a scenario like if you have two webservers to load balance and one of the server’s performance is good and other’s performance is not so good.
So when load balancing among them, you will have to consider for which server you have to put more weight on. Obviously for the server with good performance specs.
To balance the load like that, you just have to add a single parameter inside the pound.cfg file. Let’s have a look at it.
Think server 192.168.1.161:5555 is the better server. Then you need put more requests flow to that server. Under the “BackEnd” tag which is configured for 192.168.1.161 server, add the parameter “Priority” before the End tag.
Look at below example.
Pound Load Balancing Priority
Pound Load Balancing Priority
The range we can use for the “Priority” parameter is between 1-9. If we do not define it, default value of 5 will be assigned.
Then load will be balanced equally. If we define the Priority number, POUND will load the server with higher priority number more oftenly. So in this case, 192.168.1.161:5555 will be loaded more often than the server172.16.1.204:8888.

Step 3: Planning Emergency Breakdowns

Emergency Tag: This tag is used to load a server in case of all the back end servers are dead. You can add it before the last End tag of pound.cfg as follows.
“Emergency
           Address 192.168.5.10
           Port        8080
   End”
6. POUND always keep track of which backend servers are alive and which are not. We can define after how many seconds POUND should checkout the backend servers by adding “Alive” parameter in pound.cfg.
You can use the parameter as “Alive 30” for set it to 30 seconds. Pound will temporarily disable the backend servers which are not responding. When we say not responding server may be dead or cannot establish a connection at that moment.
POUND will check the disabled backend server after every time period you have defined in the pound.cfg file in case if the server could establish a connection, then POUND can get back to work with the server.
7. POUND daemon will be handled by poundctl command. By having that we don’t need to edit the pound.cfgfile and we can issue Listner ServerBackEnd servers and sessions etc. via a single command.
Syntax: poundctl -c /path/to/socket [-L/-l] [-S/-s] [-B/-b] [-N/-n] [-H] [-X]
  1. -c defines path to your socket.
  2. -L / -l defines the listener of your architecture.
  3. -S / -s defines the service.
  4. -B / -b defines the backend servers.
See poundctl man pages for more information.
Hope you enjoy this hack and discover more options regarding this.

10 mistakes that could ruin your resume

http://www.techrepublic.com/blog/career-management/10-mistakes-that-could-ruin-your-resume/


There is one goal for your resume: To show a potential employer why you are the best person for the job. However, there are so many things that can get in the way of what should be a clear message. Here are ten of the most common mistakes made in resumes.

1. Your focus is wrong.

This may be one of the most difficult concepts for job hunters to grasp, but your resume is not something you create for yourself. You create it, format it, and organize it so that it's easy for a hiring manager to gauge your fit with the job he or she is offering. It's important to tailor your resume to each job you apply to. I promise you, no hiring manager is going to study your resume for specifics that would apply to the job at hand. Your resume has to make them obvious.
For example, if you're applying for a project manager position, highlight any experience and accomplishments that show your expertise in project management, even if you have to switch to a functional resume format to do it. While the bulk of your work experience may be in tech support, it's really not applicable to the job at hand, so don't concentrate on the day-to-day minutiae. Concentrate instead on those instances where you demonstrated leadership, ingenuity, and organizational skills.

2. You have typos in your resume.

Hiring executives have a low threshold for resume bloopers. A study on working.comclaims that one out of four executives will toss a resume into the wastebasket if they spot a typo. But sometimes even the most careful people can miss a typo or two. Here are some tips for making sure you're sending out pristine copies of your resume:
  1. Enlist detail-oriented family members, friends, or mentors to proofread your resume and provide honest feedback.
  2. Take a timeout. Before submitting your resume, take a break and come back to it with a fresh set of eyes. You might catch something you missed the first time.
  3. Print a copy. It's easy to overlook typos or formatting mistakes when reading a resume on a monitor, so print it out for review.
  4. Try a new perspective. Sometimes readers inadvertently skip over parts they have read previously. Review your resume backward to help avoid this problem. You can "read" it from bottom to top, or from the right side of a line to the left. This takes away the mental expectation that sometimes tricks us into thinking a word is spelled correctly, etc.
  5. Read it out loud. This can also help you find phrases that don't make sense.

3. Your resume is too long.

There are all kinds of opinions as to how long a resume should be. Most people say to keep it to one page, but many people say that two pages are OK, particularly if you have 10 or more years of experience related to your goal or you need space to list and prove your technical knowledge.
Either way, the goal is to keep your resume lean yet meaningful. List only your selling points that are relevant to the job at hand and let go of some details that have no bearing on your current goal. You may have become proficient in Windows NT in a previous job, but it's not something that would have a bearing on a job today.

4. Your resume is not very "readable."

Never underestimate resume formatting. Consider that some hiring managers have to look through hundreds of resumes for each job opening. Also consider that those employers will usually take, at most, only thirty-five seconds to look at a one-page resume before deciding whether to keep or discard it. You should design your resume so that employers can read the document easily and process information quickly.
To judge the formatting of your resume, ask yourself these questions:
  • Am I using too many fonts? It's best to stick to one or two fonts. You can vary the size and add bold if necessary to make headings stand out but don't go overboard. You don't want your resume to look like a ransom note built out of newspaper clippings.
  • Am I overdoing the emphasis thing? As I said in the previous point, you can create emphasis by using bold, italics, underlining, etc. However, you don't want to mix methods or overuse them. You would not, for example, want to CAPITALIZE, ITALICIZE, AND UNDERLINE pieces of text. It's overkill and hard on the eyes.
  • Is there too much text on the page? There's nothing more intimidating to a reviewer than blocks of dense text on a resume. Here are some things to keep in mind: Set your margins at about 1-inch all around, use bulleted points to break up paragraphs of text that list your accomplishments, and make sure your sections are distinct. Don't be afraid of white space! If you have to choose between crammed-in text and an extra resume page, go with the latter.
You can see in Figure A how much more readable the list of accomplishments are when put into bullets separated by white space. 
Figure A 
bullets.png

5. Your name appears in the Word header .

Your name should appear prominently at the top of your resume, but even though it looks kind of cool, avoid using Word's header feature for this information. (Using Word's header feature will make your name appear automatically at the top of every page of your resume.) The problem is a lot of scanning software used by HR departments won't work on headers and footers so your resume could get lost in the shuffle. 

6. Your resume doesn't include keywords.

It's an unfortunate fact of life that many organizations use scanning software (mentioned above) when vetting resumes. This is often done as the preliminary step in weeding out any people whose qualifications and experience don't match the job being filled. So be very sure that you pepper your resume with relevant keywords. That is to say, don't use one in every sentence and don't use keywords that you don't have experience with just for the sake of sneaking in under the radar. Sooner or later you'll have to own up. The actual job description is the best starting place for finding relevant keywords.

7. You list your experience instead of your accomplishments.

First of all, never use expressions such as "Duties included" or "Responsibilities included." These lists outline only what was in your job description; they don't say whether you did them well or not. And they don't show how you stood out from the other people in your company who were doing the same things.
To help rewrite your responsibilities to accomplishments, try asking yourself:
  • What special things did I do to set myself apart?
  • How did I do the job better or differently than anyone else?
  • What did I do to make it my own?
  • What were some problems or challenges that I faced?
  • How did I solve or overcome those problems?
  • What were the results of my efforts?
  • How did the company benefit from my performance? For example, did it make or save money or save time?
It might help to use an accomplishment tracker template like this one available fromTechRepublic.

8. You use vague verbs and subjective adjectives.

Avoid, at all costs, those abstract verb phrases like "Assisted with..." or "Handled..." or "Managed...." Those phrases can mean almost anything. Every time you're tempted with one of those phrases, ask yourself HowHow did you assist with something? What exactly did you do? Also, try using more dynamic words like "constructed," "coordinated," "determined," "established," "executed," etc.
On the same ticket, it is very easy to say you "skillfully completed" some task or that you have "extraordinary people skills." But unless you can back those statements up with concrete evidence, it's just you saying something good about yourself. So explain why your task completion was skillful. Did it come in under budget and within time restraints? What evidence do you have of your great people skills? Did you get recognized for this in some way? Were you assigned more end users than other staffers? Any detail that you can offer in explanation will help.

9. Your resume is like all the others.

We're not saying that you should make yourself stand out by formatting your entire resume in a cursive font. We're saying that, since you're a tech pro, a prospective employer is probably going to expect something a little more advanced. Toward this goal consider:
  • Including a link to your online portfolio. Online portfolios can be anything from a blog or a website, to a dedicated solution (something that's just a portfolio, without any of the extra stuff). Make it something that loads fast, is visually professional, and showcases your accomplishments, mission statement, career progression, and leadership aptitude. Before you put the link in your resume, ask yourself how well the site answers questions any potential employers might have about you.
  • Adding a QR code. A QR (quick-response) code is a two-dimensional, barcode-like image  that, once scanned, directs potential employers to carefully selected, customized web pages for more information about a job seeker. It's a tech-savvy way to illustrate your strengths.

10. You lie/exaggerate on your resume

Decision makers routinely conduct background checks and online research to verify a resume. And sometimes what they find out can embarrass you down the line; a lesson learned the hard way by former CEO Scott Thompson. At the very least, don't claim education that you don't have. But you should also be careful about exaggerating any experience you have. It could take only a few targeted questions in an interview to reveal your deception.

10 things you should never do on your resume

http://www.techrepublic.com/blog/10-things/10-things-you-should-never-do-on-your-resume/?tag=nl.e101&s_cid=e101&ttag=e101&ftag=TRE684d531

What is your resume? A hassle you must undergo to walk into an interview with any hope of getting hired? Or is it a history of your professional life—ready to be shared with others to make lasting, career-forging connections?
If you view your resume as nothing more than a hurdle, you probably don't take it as seriously as you should. But if you value it as a game-changer, you understand its importance. Unfortunately, those who are new to the world of resumes (and even seasoned jobseekers) often make mistakes that can take them out of contention. Here are 10 resume mistakes to watch out for.

1: Lying

It shouldn't have to be said... but surprisingly, it needs to be said. People falsify or "pad" their resumes all the time. Thing is, it will come back to haunt you. It's a small world that only gets smaller with every passing day. Even the slightest exaggeration on your resume can catch up with you. Keep to the facts. Don't stretch or bend the truth. Don't alter employment dates to keep from having gaps in your timeline. Don't claim duties or experiences you never had. Don't. Don't. Don't.

2: Stating an unattainable goal

I'm just going to say this right now. Everyone knows you want to someday be the CEO of your own company. Everyone knows you want to stare down from above and run the corporate machine. Even beyond the unattainable goal, get rid of that objective that has littered resumes for decades. It's worthless. Saying that your goal is to climb the corporate ladder and be as wealthy as Bill Gates just piles on the bad. Scratch that section altogether and you'll have more room for what matters—experience and skills.

3: Adding achievements that aren't

We get it. You were prom queen or you were voted most likely to succeed in business (without even trying) by your peers in high school. But consider this: Are those achievements really achievements? The last thing you need is to puff up your resume with awards that have no relevance for the career you're chasing after. If you were elected president of your school's computer club four years running or you were awarded a citizenship award for your volunteer work at a local community center... then maybe we're talking. Academic achievements? Certainly. Just be judicious in choosing those highlights.

4: Citing previous salaries

Please, don't include your previous salaries on your resume. There are so many reasons not to do this. Here's one simple, self-serving reason not to do this: It will give your prospective employer a springboard for determining your new salary. Your goal should be to make more—so don't give the interviewer the means to undercut your true worth. Leave that information off so you can approach salary needs from a neutral point.

5: Including personal information

There is no reason to include the fact that you're married, have 2.5 kids, drive a minivan, attend X church, have a man cave, coach your middle child's soccer team, or think "khaki is a way of life." All of that will eventually come out in the wash as you begin your career in the IT or business world. On a resume, it has no place. If you don't agree, consider this. What happens if you go into an interview and the hiring manager happens to hate soccer or khaki? You've immediately put yourself on the defensive side of things and have to work your way around a preconceived notion.

6: Listing your age

It's not illegal for interviewers to ask you your age. They can. They shouldn't... but they can. Most often, it won't happen. But if it does, I'd recommend that you terminate the interview. Regardless of whether an interviewer plans on asking that question, you shouldn't prompt them or give them reason to question your value simply because you added your birthdate or age on that document. Leave it out.

7: Providing references

Don't include references. Don't even add "Available upon request." You're just wasting valuable real estate. If interviewers need references, they'll ask. Saying that your references are available upon request is like saying that you promise to come to work if hired. It's implied. Besides, the space on that single-page document is far too important to be used up by worthless statements.

8: Writing in third person

Jack believes that your being snarky or trying to impress by writing in third person makes you look cocky. Jack is certain the vast majority of people hate it when others talk of themselves in this manner. In fact, Jack insists that you never refer to yourself in third person unless you're trying to make your co-workers laugh. Jack would go so far as to not even write in first person. Why? I'm fairly certain it is understood every detail on your resume is about you. Agree with Jack...everyone is doing it.

9: Using a less-than-professional email address

It doesn't matter that you've used bromancewithbooze@gmail.com as your primary email address for years. Leave it off your resume. If that's the only email account you have, create a new one with a professional name (as in, your name). Even if you use it only for resumes, do it. (Along the same lines, don't use an AOL account address—especially if you're applying for a tech job!)

10: Including your current business contact information

Do this and you might wind up receiving a call at your current place of employment by your prospective employer. Never list the contact information of your current business. If the potential new employers want to contact your current business, all they have to do is look up the name to get the details. The only phone number you should include on your resume is your mobile number. Nothing more. And don't forget, your current employer might well be monitoring your phone calls and emails. Let that be your guide when you add information to your resume.

Other tips?

Your resume should help potential employers navigate the waters of your professional past and present. Don't muddy those waters with unnecessary information that could send you to the slush pile. Keep it relevant, fresh, and to the point and you'll increase the chances of getting to the next round of interviews.