The Stack Overflow podcast is back! Listen to an interview with our new CEO.

Hot answers tagged

57

A single powerful server can only be upgraded so far. Once you have the most powerful server available, your site cannot grow more without splitting it between servers or making it more efficient. There is also the cost factor. A single server that is super powerful may cost ten times as much as two servers that are half as powerful. You want to be able ...


31

From Rear Admiral Grace Hopper: On the building of bigger computers: "In pioneer days they used oxen for heavy pulling, and when one ox couldn't budge a log, they didn't try to grow a larger ox. We shouldn't be trying for bigger computers, but for more systems of computers." source


13

DNS has no concept of ports. DNS only points to the IP address. The port to connect to for a particular service is determined by convention. For example the default port for HTTP is 80 and the default port for SSH is 22. The only way to override the default port is to specify it in the URL (or on the command line for something like SSH). There is no ...


12

If you do not have specific experience running this kind of websites, then I would strongly suggest you to get a separate server. While having an adult site on same server with different websites might not affect your non-adult sites directly, there are plenty of things that can go wrong (e.g. IP flagged/blacklisted for "spam"-like emails, content IP-blocked ...


10

One reason is that it's easier to gain user access to a linux server than it is to gain root or the specific user that's allowed to access the script. If you set the permissions so anyone can access/modify/delete all important scripts, then you're removing a layer of security that user based permissions provide. If someone fumbles across a user account then ...


10

Stephen explains the major consideration to make when deciding on a systems architecture: the tradeoff in vertical and horizontal scaling. I'll add a few other considerations: Separation of concerns: you mention multiple radically different systems: reverse proxies, DB, content servers, etc. From a maintenance and security standpoint it is clearly ...


10

When your website is too busy due to a large traffic, the best way of redirection is using custom error documents. So, when a user gets 503 error code, the server will redirect visitors to the custom error document page you have defined. There are different ways for different servers to customize error document pages. 1. For Apache server, add the ...


10

Do a traceroute on the IP address in question and you will more than likely find that the IP address traces to Europe somewhere. The whois record for the IP address in question is simply returning the registered owner of the IP address range and their organisational details. It will show up as the US as that is where GoDaddy is registered and where they will ...


8

Size limit. We like to pretend that a single box with multiple processors, memory chips and disks is uniform. This isn't entirely true, but it's true enough if your numbers don't get too big. There are technical limits on heat, energy, proximity etc. which means there'll always be a practical limit on how big a single server can be. Scalability - there's a ...


8

In a Google Webmaster Help thread, Google's John Mueller said in response to the question of SEO and server location: For search, specifically for geotargeting, the server's location plays a very small role, in many cases it's irrelevant. If you use a ccTLD or a gTLD together with Webmaster Tools, then we'll mainly use the geotargeting from there, ...


7

Let's take the problem at small scale. A tiny office with one server running mail, ActiveDirectory, file share, and the web site for the company. Hackers hit it and you have to reboot because IIS is messed up. Or Exchange needs an update and a reboot. Or Active Directory got corrupted. Any of these isolated "one service is down" problems affects the ...


6

You can do load balancing as per @PeeHaa's link to Wikipedia's article for info here. This requires some know how and money and time to setup. Large companies like Google and Apple use technology they have written for themselves and trying to mimic them is an expensive and an overkill solution. If you do load balancing you will want to use something much ...


6

Open your host file /etc/hosts with a text editor and make sure it contains: 127.0.0.1 localhost If it still doesn't work, run this command: file -b /etc/hosts and make sure the result is ASCII English text and nothing else. If it is not, use an editor such as TextWrangler or BBEdit to clean it up (use Unix end-of-line characters). Source: Apple ...


6

Currently my website is under maintenance. If your website is only temporarily "under maintenance" and has already been live and indexed by search engines then you should consider returning a "503 Service Unavailable" HTTP response code with perhaps a Retry-After HTTP header indicating when the site is expected to be available again. Instead of simply ...


5

I know I'm bringing a question back from the dead, but what the poster is looking for is called "load testing" and it is hard to do this yourself. There are sites that can handle this for you, some with tests that can be run for free. One such site is http://loadimpact.com/, it simulates users on your site and slowly increases the number of simulated users ...


5

Well as for the big guys (Google, Apple, etc.) they have sophisticated, and expensive, hardware the routes traffic. A simpler solution would be to setup your multiple hosts and have a single host that rotates the requests. Say we have 5 servers for hosting the video, named VideoHostN and we have a single server separate from those that keeps track of them ...


5

The first thing to keep in mind is that compression checkers sometimes lie for various reasons, so take their warnings with a grian of salt. As a few people have recently said on Stack Overflow ySlow is not gospel (but I do like it myself). What I would suggest doing, rather than employing zlib.output_compression in php, is to enable mod_deflate in Apache. ...


5

Do you mean with regards to search? From Google's point of view: no, that's fine. There are a limited number of IP addresses, so you need to share. The only exception I can think of is if you have a ton of really spammy sites on a server, and just a tiny number of good ones, but that doesn't sound like your situation. In cases like that, we / our ...


5

It seems like you're aiming for the second-worst outcome. If you're expecting a spike, you have time to do something: Implement in-code caching (can be easy, can take a while to get right) Optimise static files (jpegoptim, optipng, more-css, etc) to reduce bandwidth, speed things up for all users. Move your static stuff to a CDN to remove those requests ...


5

You would need to do two things, One: You will need to create the sub-domains in your DNS. You will use a CNAME (alias) for this. For example. Creating a CNAME for www.example.com that points to example.com is how www is added to a domain. You will be doing essentially the same thing. In your case, you would create a CNAME for... cl.example.com pointing ...


5

Yes, this is a perfectly valid solution to the problem. It also covers the "use a cookieless domain for static assets" speed recommendation, if setup correctly. This won't add additional server load, as the requests are being served by the same server either way. It also makes it easier to move to/from CDNs at a later date, since you can change that ...


4

Keep in mind you can always use a hosting provider to accomplish what you want, but if you prefer to host from home there are a few hurdles to consider. You have to make sure your ISP does not block port 80. It used to be a common practice amongst ISPs, but I don't think they do it anymore. If they do block it, you could host on a different port, but that ...


4

In case you're curious, here's the source (or a copy of it) to the attacker's method: http://pastebin.com/yCW9vWzZ This may help also: http://www.wjunction.com/10-hosting-discussion/116021-boxslots-hacked-again-5.htm As for being worried? If you are sure you follow the orthodox server security protocols, and you actively check for and fix any holes, then ...


4

Actually when using hosting management software like cPanel, it installs MySQL with default and commonly used configurations: MySQL host = 'localhost' MySQL port = '3306' MySQL User = 'cpanelusername_mysqluser' [1] MySQL password = 'password' [2] MySQL database = 'cpanelusername_database' [3] More explanations about the host address: If your ...


4

Okay there are a few ways to skin this so to speak. First get the IP of your new server. Run a ping using a tool like Just Ping. There you can see your global ping times. This will give you an idea on how long it takes to connect to your server from large cities around the world. Ten for more information you'll want to use something like Pingdom Tools to get ...


4

The main reason is: HTTP requests include the domain name. You could have stackoverflow.com and askubuntu.com all served off the same front end machine. When the server gets a request it needs to know what content it has to send. That's the main reason server configuration speaks about host name at all. Why do you have to set it if you're only serving one ...


4

PTR records can be set by your service provider. If the IP is delegated into their ownership, they are the ones who can set the PTR record.


4

It is generally unwise to allow www or apache to have write access, however, this can be done safely by limiting the access to a single directory and not allowing any executables in that directory. For example, the docroot of your php based site is /var/www/example.com You would want your webserver setup so that the only php executable access point is /var/...


4

From the Apache docs SymLinksIfOwnerMatch The server will only follow symbolic links for which the target file or directory is owned by the same user id as the link. So, enabling this option (as opposed to FollowSymLinks) prevents symbolic links being followed that might point to some critical parts of the system (where the owner of the link does not ...


3

There is no extra overhead for a 500 status code. I would argue that your management is correct, because the application can accept queries at that URL, provided it is given the appropriate arguments. Returning a 404 error instead of a 500 error to combat DoS attempts is really just an appeal to security through obscurity.


Only top voted, non community-wiki answers of a minimum length are eligible