
Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [tlug] DDB/CJKV-E Web Host under DDOS attack
- Date: Tue, 15 Mar 2016 15:31:28 +1100
- From: Jim Breen <jimbreen@example.com>
- Subject: Re: [tlug] DDB/CJKV-E Web Host under DDOS attack
- References: <55E425B2.3010309@l.u-tokyo.ac.jp> <5684F956.6080103@l.u-tokyo.ac.jp> <56875688.2030409@l.u-tokyo.ac.jp> <8F8F0284-13E6-49E1-992F-B5EDD148BAED@tsukaeru.net> <20160104041200.GC3188@monotonic.cynic.net> <CABHGxq5sz5RakSxtO=XW-obittzdKwnvMd7ZBwp=rNhE09V0jA@mail.gmail.com> <20160106042312.GA24871@monotonic.cynic.net> <CABHGxq5xa_ck+rPtuV-fN2Ho4qeZ3muaGbmsCmJRsr-bZkccSg@mail.gmail.com> <20160308083313.GI5597@telephonic.cynic.net> <CABHGxq4eM8fLQ-9sNke00D=H_kowrVhbbL6q061S210Fyq4+nQ@mail.gmail.com> <20160313191847.GI1347@telephonic.cynic.net>
On 14 March 2016 at 06:18, Curt Sampson <cjs@example.com> wrote:
>
> Well, I had a bunch of commments, but then I came across this:
>
> On 2016-03-10 10:24 +1100 (Thu), Jim Breen wrote:
>
> > A rush of requests has lead to a heap of processes (httpd, etc.) being
> > spawned, a sudden runout of RAM and swap, and the system eventually
> > thrashes itself to death.
>
> That's your number one issue right there. In general, if you *ever*
> allow requests to cause new processes to be spawned, you've set yourself
> up to be hurt a lot more by a DDOS than you need to be.
Or by over-enthusiatic/badly-constructed SEO crawlers, etc. etc. Of course
it' hard to stop requests leading to processes in a typical web system. Our
current belt-and-braces approach, which is limit httpd numbers (currently set
at 50 max), and for the maintenance system stop the scripts calling the
database if free swap is below a threshold, seems to be holding the line
well.
> From your other comments (e.g., about wwjdic being in C and not using
> an external DBMS) I can see that the system is rather less typical than
> I'd first assumed, so any other advice before I properly understand it
> (including my advice in messages before this one) is going to be kind of
> hit-or-miss.
>
> That said, I find it hard to think of a situation where, for a site like
> yours, if properly written, a DDOS could run you out of CPU or disk
> before bandwith on "regular" machines (by which I mean, your typical
> cheap i7 things without 10GigE interfaces).
Yes, very high loads tend to show up as bandwidth usage. Last year
our main cloud server showed a big jump in bandwidth use. The logs
showed a heap of accesses from a client called "TRAG", all hitting
the text-glossing function in wwwjdic. It turns out it's a system called
"Translation Aggregator" and it can be configured to call wwwjdic
automatically for every Japanese string - small wonder I was seeing
thousands of calls an hour from some IP addresses,
See: http://www.hongfire.com/forum/showthread.php/94395-Translation-Aggregator
Anyway I discussed it with the maintainer and he made some changes
which resulted in the load going down significantly. I still have
an alert on it, and I occasionally sin-bin IP addresses which
overdo it (sudo /sbin/route add -host n.n.n.n dev lo).
> Anyway, I'm happy to kick around further ideas about this any time, but
> it probably needs a chat rather than just e-mail.
I think we're tracking pretty well. I have a couple of very experienced
sysadmins in the team
Cheers
Jim
--
Jim Breen
Adjunct Snr Research Fellow, Japanese Studies Centre, Monash University
Home |
Main Index |
Thread Index