New Perspectives On Web Design

(C. Jardin) #1

CHAPTER 8 How to Fix The Web: Obscure Back-End Techniques and Terminal Secrets


Denial of SeRviCe
Imagine that the Widget 3000 suddenly goes viral. The Queen of England
is filmed throwing one at the winner of X Factor and suddenly everybody
in the world wants to own one. You might think “Fantastic!” But unless
your server infrastructure is prepared to go from 100 visits an hour to
100 million, you probably won’t actually sell very many. All those visitors
accessing your website at once will grind the network and your server to a
halt. The first few thousand visitors may receive half a Web page, the rest
will be staring at blank browsers.
And when you try to telnet to your server as above, it will also sit there
waiting — no refusal but no entry either. This is roughly what happens in
a distributed denial of service (DDoS) attack. All those hackers who have spent
the last 15 years finding holes in Internet Explorer were not working in
vain. They have managed to plant Trojan horses on millions of computers
worldwide. When they issue the command, all those computers suddenly
try to send data to and request data from your Web server, overwhelming
it and making it unreachable.
Unless you are running a bank or a spamming operation, or have
managed to make some clever and determined enemies, it is unlikely to
happen to you. Let’s assume telnet has instead connected successfully.

Checking Your Server
Now you’re in business. You’ve got a terminal window open on your
server waiting for your every command. From now on, all the commands
are being issued on your Linux server, not your laptop. Other types of
UNIX server, including Macs, may have different commands or the same
commands with different options.

liSTening To PoRT 80
The first step is to figure out which software should have responded when
you tried to telnet to port 80. For that, you can use the netstat command
Free download pdf