August 23, 2008

By Jeffery Wong



Posted In




Service Outage

The server hosted the Hong Kong Weather script just suffer of abnormal frequent access. The CPU usage went high and fail to give further response. I am not a server admin expert. May need further investigation/study to prevent next “visitor”. Any friend can give me some hints to solve it?

P.S. The time in the log is US because the server is located in there.


  • goodwill said on August 23, 2008

    Indeed I am a bit surprised on how you get this thing work- you better off port the logic onto your iphone app instead of hosting the script yourself. It’s just not going to scale.

    For the time being, use a simple db to keep track requested ip and setup a threshold for the no. Of connection (I read that from an book calling this DYoS- denial you of service) will help. Also an password protected htaccess for the script with the password hardcoded in app could reduce some really layman attack.

  • Jeffery Wong said on August 24, 2008

    Port the logic into the app can help to scale up. But the data of the weather information from HKO has no standard API and distributed into at least 4 different pages. If client has to get 4 webpages and parse it for each update, it seems not efficient for a mobile device/network. Also, if HKO changed the page format, the client need to revise, and distribute to user again. The Apple approval process take at least 7 days. It means the old client will get parsing error before they get the update version. It also make customer support and trouble shooting difficult. So I think I will still keep a server script to generalize the data for client use. (I am just a beginner in programming anyway. Please point out if there are any concept misunderstanding.)

    I am reading some doc about dropping connection for that kind of attack with firewall. Will also take a look of the approach you proposed. Thank you.

    P.S. Liked your blog. Highly recommended all friends to take a look.

Speak Up

Your email address will not be published. Required fields are marked *