Forum Moderators: phranque

Message Too Old, No Replies

I'm getting DDoSed by visitors...

         

KimmoA

2:51 pm on Aug 17, 2005 (gmt 0)



OK. Here's the deal. I live in Sweden, and here, for some weird reason, bandwidth is much more expensive than in the USA (although we have really fat home connections -- I don't see how that adds upp!)...

I basically ruined myself building a server over a period of time and buying a one-year co-location 1U rackspace for it at this local (Stockholm) ISP. It was the cheapest one I could find that didn't require me to send the server halways across Sweden (plus, that ISP was truly crap). I need to be somewhat close to my server if something goes horribly wrong, don't I?

If you wonder why I didn't just buy a machine in the USA, my explanation is... well... I like doing everything myself. I'm a geek. I wanted this experience. It gives me a feeling that I didn't "cheat" (just like I write all the software by hand).

ANYWAY... my main site, <snip> has been going pretty bad ever since I launched it. The competition is deadly, and I have $0 to spend on advertising and basically I have no resources/contacts whatsoever, other than my knowledge. My knowledge includes optimization server-side, good SEOing and writing of valid Web pages. I also consider my sites to be very well structured and logical, without any bull#*$!. I really hate bull#*$!.

With a recent boost technique (basically adding a lot of fake ads), I get a lot of traffic. And I mean a lot. The thing is that I get 30 GB A MONTH for my 750 SEK rackspace (7-10 SEK is one USD), which is, IMO, very little. <snip>, which I use as an image server for one of my sites, gives me 300 GB a month (10 GB/day) and 5 GB storage for around $7. Heh. Maybe not quality bandwidth, but still bandwidth. Of course, <snip> is located in the USA.

Despite me using minimalistic, non-bull#*$! and gzipped output, the traffic for that site alone today is over 2.3 GB (and it's just 16:45 o'clock)! With 30 GB a month, I can basically afford 1 GB a day... and that's pushing it. Now consider that I don't even host the photos...

Basically, I get flooded with traffic. Despite this, nobody seems to use the ads. This is a freakin' hell!

I don't know what to do anymore. I expected things to be hard, but this is just pathetic. Every 1 GB over 30 GB per month (quota reset at the end of each month) I have to pay 15 SEK! This is gonna ruin me unless people start freakin' using the ads.

Why is life so unfair? Why can't things work out for me? Why do people who hardly work at all succeed better than me?

Damnit.

[edited by: trillianjedi at 4:11 pm (utc) on Aug. 17, 2005]
[edit reason] TOS [/edit]

JAB Creations

3:14 pm on Aug 17, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Well your post is very indepth and I'll just try to help you chip away at what I know...

If you're doing your code in a text editor then GOOD...this will be no problem for you...

My first piece of advice is to do whatever you can to cut down on bandwidth. Your page is basic and that will help you tremendously. You just need to optimize your code a little.

A very useful tool is called "Advanced Find and Replace" and if you want to BLAST through optimizing your site this tool is easy to use/learn quickly (minutes) and should do the job just fine if you're used to editing via text editors. Sticky mail me as I don't want to turn this post in to an ad of any kind though.

First off reduce the whitespace...thats bandwidth fat right there. I format my code using only one or two spaces to indent my code and I've worked it out so that I can skim my code easily.

41 Bytes (Current Formating)

</div>
</div>
</body>
</html>

34 Bytes (Optimized Formating)

</div>
</div>
</body>
</html>

*EDIT* crap - webmasterworld kills out whitespace...but yeah, kill your whitespace down a bit.

That alone will cut down perhaps 10-40% of your bandwidth via HTML files perhaps? Anything helps right?

Also replace strong tags with b tags.

Use scripts as external files. Just take everything between the opening and closing script tags and put it in a file with a .js extension. That WILL cut down on bandwidth because the server and browser's cache will 304 the file requests (not modified --aka don't download since you already have it in your browser's cache) saving you some more bandwidth.

Cut down your keywords a little...keep it under 10 if at all possible. Keywords are not taken too seriously anymore because people use them in huge chucnks but they are still worth having if you use them conservatively. Your meta description is fine.

I only speak two languages, English and bad English ... but content is content and you'll have to decide if you need to cut down on it or not.

Your charset is good...using UTF-8 would make your files larger (like increasing color depth for your screen uses more memory, 4mb for 32bit at 1024 and 8mb to use 32 bit at 1600).

<snip>

Your page validates! Good man!

I could suggest also using a good stats script to help you get an idea of whats going on at your site. Perhaps you're getting hammered by spammers? You could use apache to deny crap you don't want hitting your site but you won't know unless you're in the know. I'll Sticky you something to look at.

I know this may only dent problems but it's a start some momentum is better then none I hope.

[edited by: trillianjedi at 3:37 pm (utc) on Aug. 17, 2005]
[edit reason] TOS [/edit]

JAB Creations

3:23 pm on Aug 17, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Also use Photoshop to save images (though you're smart and not bathing in your own blood so to speak like those massive grphics based pages which I find obnoxious even on broadband).

I'll sticky you an optimized file. Your current logo is 2407 bytes and with Photoshop (save for web) I've got it down to 534 Bytes.

KimmoA

3:33 pm on Aug 17, 2005 (gmt 0)



Thanks for your replies, JAB Creations!

Let me try to answer them...

"If you're doing your code in a text editor then GOOD...this will be no problem for you..."

Yeah. I would never dream of using a WYSIWYG editor. My code is very dynamic server-side and uses a structure I've developed over a few years.

"A very useful tool is called "Advanced Find and Replace" and if you want to BLAST through optimizing your site this tool is easy to use/learn quickly (minutes) and should do the job just fine if you're used to editing via text editors. Sticky mail me as I don't want to turn this post in to an ad of any kind though."

Well... saying that, I assume it's gonna cost money. I truly have no money to spend <:)

(Besides, my output is baked into scripts and I think any program would have a hard time editing it, if it could find anything to edit, as I already think it's optimal in most places.)

"First off reduce the whitespace...thats bandwidth fat right there. I format my code using only one or two spaces to indent my code and I've worked it out so that I can skim my code easily."

You're right. Neatly formatted output is basically pointless, but I'm a perfectionist, you see... ;)

I think I'll probably end up removing them when I'm done writing this reply, though...

"Also replace strong tags with b tags."

Well... sorry. I know I basically use strong for "bold text", but it goes against my principles to use something deprecated like that :\

"Use scripts as external files."

Well... luckily, I hardly use client-side scripts at all. I believe in the server side! Those I use are so minimal that they basically are one line anyway :-)

"Cut down your keywords a little...keep it under 10 if at all possible. Keywords are not taken too seriously anymore because people use them in huge chucnks but they are still worth having if you use them conservatively. Your meta description is fine."

Yeah... actually, on my other sites, I only output the meta tags for Google and UAs containing the string "*bot*". I know this is unethical, but why, really? Why should normal clients see this? Talk about waste of bandwidth!

"I only speak two languages, English and bad English ... but content is content and you'll have to decide if you need to cut down on it or not. "

Basically, I have minimal information and instructions. The homepage only links to the sections. I can't tell you enough how extremely non-bull#*$! this site is compared to any similar one... :/

"Your charset is good..."

Yeah... and I use CSS and all kinds of good practices -- no inline styling or tables for layout, eating up tons of bandwidth... like my competitors.

"Your page validates! Good man!"

Yeah... I like doing things right.

"I could suggest also using a good stats script to help you get an idea of whats going on at your site."

I use Webalizer. Most of this traffic seems to come from some IPs owned by a weird Swedish company, actually, and it's scarying me a bit... I e-mailed them about it, and he told me that he had "forwarded it" to the tech. guys. I wonder what they reply.

"I know this may only dent problems but it's a start some momentum is better then none I hope."

Nah... I'm happy for all replies. You took the time and gave me the best advice you had, and I appreciate it.

I just can't believe how the "click" ratio can be so low. Or more like the "buy" ratio. Google AdSense, BTW, gives me like nothing for clicks. 0.00000001/click. It sucks so much.

trillianjedi

3:38 pm on Aug 17, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Interesting thread, but lets keep out the specific domains please folks.

Thanks.

KimmoA

3:40 pm on Aug 17, 2005 (gmt 0)



"Also use Pho"toshop to save images (though you're smart and not bathing in your own blood so to speak like those massive grphics based pages which I find obnoxious even on broadband)."

Hmm. I have always thought of the "save for Web" feature as a stupid thing for newbies, and always just converted my GIFs to < 256 colors (if possible) and saved them as that.

Now, when I finally went back to checking out "save for Web", I see that you can indeed get a smaller file size with extremely little changes. That's cool. I'll definitely experiment with that.

KimmoA

3:42 pm on Aug 17, 2005 (gmt 0)



trillianjedi: Alright. Didn't know that was a rule. It's kind of hard to help without knowing the URL, though.

<snip>

[edited by: trillianjedi at 4:02 pm (utc) on Aug. 17, 2005]

KimmoA

3:50 pm on Aug 17, 2005 (gmt 0)



If you're interested, here's a capture of the sky-rocketed traffic: <snip>

[edited by: trillianjedi at 4:01 pm (utc) on Aug. 17, 2005]
[edit reason] Please see TOS #13, thanks. [/edit]

trillianjedi

4:02 pm on Aug 17, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



It's kind of hard to help without knowing the URL, though.

Actually, we don't need the URL at all - a description suffices perfectly. The TOS is there as a SPAM prevention policy, and legal problem prevention policy.

We do not discuss hosting here, either.

It's one of the very reasons why WebmasterWorld is a high quality forum, with a good signal to noise ratio.

TJ

KimmoA

4:10 pm on Aug 17, 2005 (gmt 0)



I seriously didn't think that that last URL broke any rules...

(Having to explain exactly how my Web pages were structured would be a lot of wasted time, don't you think?)

JAB Creations

4:19 pm on Aug 17, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I understand and for the most part agree with th TOS on everything I've seen it come across posts for including hosts. It's not really an objective conversation topic. Now if you were talking about benefits between hosts without host names such as ... you can get X-GBs of bandwidth for 7 bucks a month if you look around ... that might be considered acceptable perhaps?

If you're running Apache you could just BLOCK the IP(s) that are sucking up your bandwidth.

.htaccess

#comment your blocking so you remember why for future purposes
deny from xx.x.x.#*$!

Not sure how to block ranges...again hit up the Apache forum...you'll get some good help there. I randomly roam the forums and not too much on the advanced areas myself.

KimmoA

4:36 pm on Aug 17, 2005 (gmt 0)


Yeah... I know that I can block IPs, but I'm not yet sure what they're doing. It's got no UA string (ghetto script?), so I suspect that they are doing something funky. I'll have to wait for their e-mail reply, though.

One scary thing I came to think of... anyone could DoS me easily from his home connection and ruin me. 30 GB is nothing for a home connection over here. I have 24/1 Mb/s myself at home over ADSL with unlimited (really) bandwidth.

This is very nasty and I can't for the life of me understand why "commercial" bandwidth is so much more expensive here.

Ankhenaton

4:58 pm on Aug 17, 2005 (gmt 0)



I installed mod_evasive for small to medium DOS attacks.

zCat

5:09 pm on Aug 17, 2005 (gmt 0)

10+ Year Member



30 GB A MONTH

I don't know what the market is in Sweden, but in Germany, where I have several clients, you can get rental servers (i.e. your own genuine server, no virtual/shared server junk) plus loads of bandwidth - 300 GB is typical - for well under 100 Euros. The cheapest offer I know of is €20 / month for a low-end celeron and 100GB. €39 will get you an Athlon XP 3000 with 500 GB from an operator I would recommend highly (sticky me for the URL, I have no affiliation with them, just a very happy customer). This is not colocation, which tends to be more expensive, but unless I had very special hardware requirements, in Germany it's not worth it.

KimmoA

5:21 pm on Aug 17, 2005 (gmt 0)


Well... I run FreeBSD, and they often just give me the choice of Linux or Windows. But there certainly are many great foreign (to me) FreeBSD hosts. One of them was in Germany, just like you mentioned.

I'll definitely get a cheap server somewhere the next time :\

jomaxx

5:45 pm on Aug 17, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Dump the host you're with or move up to a better plan. Those bandwidth overages can really hurt. You can get a server anywhere in the world; there's no need to be physically close to it.

In the meantime, move any files that don't have to be on your main domain to your high-bandwidth server. External CSS and Javascript, pages that don't need to be listed in search engines, etc.

Start looking for affiliate programs that have some commonality with what your visitors are interested in. Affiliate programs can sometimes work far better than AdSense. If nothing else fits, at least Amazon is flexible enough to allow you to create compelling ads for virtually any subject under the sun.

Consider geotargeting your Amazon links so that British traffic goes to .co.uk, U.S. traffic goes to .com, etc. However that can be a little hard to do for product-specific links.

[edited by: jomaxx at 5:51 pm (utc) on Aug. 17, 2005]

JAB Creations

5:49 pm on Aug 17, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Blocking blank user agents via Apache...
[webmasterworld.com...]

You can download at three megabytes a sec? Holy!

I've heard (not much but I read news online ocasionally) that Europe is open...are you physically going to the server? I mean if not then any where really as long as it's not a 1,000 ms lag (other side of the planet) you should be fine unless I missed something?

[edited by: jatar_k at 6:08 pm (utc) on Aug. 17, 2005]

KimmoA

5:55 pm on Aug 17, 2005 (gmt 0)


I can't dump it. It's sadly the best available here for co-location :-(

I really researched this before spending my driver's license money on server rent for a year.

Blocking hosts feels drastic, but if this doesn't go over, I might have to do so...

I'm not sure what you (JAB) mean about your last reply, though...

jomaxx

6:19 pm on Aug 17, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



What he's saying (what we're both saying) is that you don't need co-location.

Also, you mentioned something about browsers with no identifier sucking down bandwidth. You can use your .htaccess file to block access to your site for that agent, or any agent(s) you wish. That way you don't have to mess with IP's.