`

State of Blogdetik February 2008 20

Posted by andry
on Sunday, March 02

I would normally do something like this in Dapur. But heck, it is down now. I know how it feel to have our own blog down. We’ve been working it out on Sunday morning.

It will be up sometime soon. Take it as matter of faith, Maia.

Now, the moment of truth. Blogdetik is infant. We installed blogdetik in a crappy old server about 6 weeks ago for internal blog (I think you should write this fact). And stir was changed. We decide to give it a try for public. After several hacks, that leads to another hacks, we did it. Same old crappy server, 2 new database servers (master-slave), and 1 LDAP server to store account information.

Blogdetik was online at Feb 1st 2008 10.00 PM.

Maybe 9.00 PM.

Maybe 8.00 PM.

You know how unpredictable DNS stuff is. However I knew that it was online since I checked it with my PDA in Taman Menteng that night. Rest of team were working overnight just to make sure everything went allright.

And sleepless nights are still part of our agenda for next couple of days to come.

Last wednesday we replaced that crappy old server with a decent one. It is not good enough, Opteron something with 8GB of memory didn’t help much. We’ve been suffering downtime every morning since Thursday. 2 httpd process take entire processors and then eventually, hungs up application server. We did prefork tune. We put XCache. We give WP-Super-Cache a try. Latency tests are good. Capacity planning are worked out thoroughly. Several stability pattern/antipattern also addressed correctly. Of course, we did compile PHP and Apache ourselves to gain 64bit advantage. Still, these two httpds are such pain in the ass. There’s nothing in pstree. Error log don’t help much.

Sigh. I miss doing post-mortem server analysis in enterprisey JVM through thread dump. If anyone happens to know how to perform httpd thread dumps autopsy, raise your hand please.

Lies, Damn Lies, and Webtrends

Above all, our biggest problem is this: Blogdetik is sold out. Like selling free candy in kindergarten. Free candies run out, while demand stand still.

Blogdetik is chasing Detikforum, Alexa said. Climb, you fool! Climb, you fool!

Report Range: 02/01/2008 00:00:00 – 02/29/2008 23:59:59
Number of blogs: 2042
Number of users: 1712
Average Page Views Per Day: 44,348
Unique Visitors: 45,491
Visitors Who Visited Once: 30,201
Visitors Who Visited More Than Once: 15,290

These numbers are still small compares to “One million blogs in 2008”. This is not our target, though. We get that somewhere from a great idea created by you.
What do you guys call it, PestaBlogger?

What’s Next?

The idea is to give more candies. Also known as vertical scaling.

Blogdetik future architecture

Before that, however, I would lie, cheat, steal, suicide, and sell my soul to demon just to get rid of httpds problem first. Soon after everything seems fine, we will moved out to nginx.

Nginx is small-footprint webserver (It has 2MB memory footprint whilst Apache eats 20MB running altogether in my small MacBookPro). It is now our standard Ruby on Rails deployment strategy (i.e: our Adpoint servers). Soon-to-be standard for all deployment platform in our system architecture (except several JVM app server node clusters). As the matter of fact, progressive download in DetikTV and one of DetikNews mirror, since last Monday, are now nginx.

Every network engineers around here are just amazed by nginx. I hope it is also to be a remedy to Blogdetik problem.

Okay now. GTG.
Our God(s) are crying out loud again. Sit tight, and I’ll be back next month for future report.

Update:
It appears that we didn’t properly configure mod_rewrite thingy. Each request yielded multiple threads which was eventually bogged down httpd (Hints: MaxRedirect directive). Silly us.
Blogdetik is now stable, and scalable. httpds sit in 200-300MB memory footprint with XCache enabled. Although it still doesn’t match my personal speed expectation, I believe it is already fast enough for most people. Enjoy!

Comments

Leave a response

  1. budiwMarch 02, 2008 @ 01:35 PM
    Tak pikir koneksiku pak andri... ternyata-eh ternyata... --budiw
  2. sufehmiMarch 02, 2008 @ 02:39 PM
    Cool ... nice one. This will be of interest to many people worldwide. I have a suspicion though that the Alexa's numbers are nowhere the real numbers :) come on mate, spill it out ! :D Anyway, if you hit this problem again in the future and think you can use some assistance, just call. I've been able to increase WPMU performance on standard machines up to 1000 requests per second. Yes, this thing was not the easiest one to optimize indeed. It was hell for me as well. Glad it's the past for me now :)
  3. HediMarch 02, 2008 @ 10:34 PM
    tapi sejauh ini soal sensitif "rayaban" masih ok, kan? ;)
  4. anonymous cowardMarch 02, 2008 @ 11:26 PM
    coba check tulisan2 / presentasi2 seputar livejournal scaling (brad fitzpatrick). bagus buat ngelmu high perf web server. iya pertama nginx dulu.. ujung2nya replace semua pake rails heh heh heh...
  5. SEggafMarch 03, 2008 @ 07:26 AM
    Ganbatte, boss... Semoga Blog Detik-nya bisa cepat up kembali...
  6. snydezMarch 03, 2008 @ 08:19 AM
    old crappy server
    entah kenapa kalo seorang 'master' nyebut old server, koq bayanan gue sebuah mesin berprosesor 386 ya? :D bukan khan? :)
  7. budiwMarch 03, 2008 @ 11:00 AM
    @snydez Hehehe, old crappy server iya rasanya kayak komputer amd duron 800mhz yang memorinya comot sana sini dan hd hasil dari sumbangan... :D
  8. AndryMarch 03, 2008 @ 11:18 AM
    *Anonymous Coward*
    Udah baca yang itu. Nggak begitu aplikatif untuk kebutuhan "skala kecil" kayak ini.
    Anyway, saran untuk pindah semua ke Rails itu saran yang nggak masuk akal.
  9. iangMarch 03, 2008 @ 12:22 PM
    ini yang dulu bisa ngebuatlo ngebunuh gue ya?
  10. alikusnadiMarch 05, 2008 @ 02:12 PM
    boss... kok ga ada angka2 nya yah... apa saya salah baca yah :p
  11. IMWMarch 05, 2008 @ 03:22 PM
    Salah satu trick yg sangat efektif tapi jarang dimanfaatkan oleh server Indonesia adalah memanfaatkan content statis sebanyak mungkin atau membuat content static dari content dinamis sebelum direquest oleh client. JAdi kuncinya mempelajari traffic yg masuk dan frekuensi update dari tiap content. Trick ini memungkinkan server melayani request walau akses besar dan capacity link besar (biasanya kalau capacity link terbatas, sebelum server meninggal network sudah saturasi). Sayangnya kalau kita pakai CMS jadi sering semuanya menjadi serba "dinamis". Dan ini sangat memakan kinerja.
  12. dedenfMarch 05, 2008 @ 08:38 PM
    memcached anyone?
  13. sufehmiMarch 06, 2008 @ 08:06 AM
    Salah satu trick yg sangat efektif tapi jarang dimanfaatkan oleh server Indonesia adalah memanfaatkan content statis sebanyak mungkin atau membuat content static dari content dinamis sebelum direquest oleh client. . Ini (konversi content dinamis menjadi statis) sudah bisa dilakukan secara otomatis oleh squid sejak ... cukup lama, saya juga kurang tahu persisnya, pada konfigurasi sebagai reverse proxy. Atau dengan software2 reverse proxy (edge servers) lainnya.
  14. dikshieMarch 06, 2008 @ 07:14 PM
    reverse proxy menggunakan varnish
  15. yudhiMarch 09, 2008 @ 08:01 PM
    Ditunggu report menggunakan nginx nya pak ^_^ yang "katanya" enteng ,dibandingkan dengan apache :D sama kalau bisa,sedikit resep cluster nya :P
  16. andrias ekoyuonoMarch 09, 2008 @ 11:24 PM
    C'mon boss, I'm waiting for you ! :-)) *podo mumet e*
  17. mobihekerMarch 10, 2008 @ 07:25 PM
    hebat euy
  18. lantipMarch 15, 2008 @ 11:46 AM
    *daripada tidak komen*
  19. gagahput3raMarch 20, 2008 @ 06:23 AM
    Konsul aja ke Ki Joko Bodo mas, siapa tahu dia mau jualin jiwa mas buat nyelesain masalah httpd :D atau kalo yg lebih rumit lagi, lebih baik panggil sang pakarâ„¢, pasti bisa deh. Dia kan juga nanganin blognya presiden :P *lam kenal, salut ama blog detik.
  20. shunichirouApril 22, 2008 @ 01:23 PM
    hem ternyata, mengelola blog itu sedemikian rumit juga ya salut juga buat detikblog
Comment