Bye bye 502’s

February 13th, 2009

It’s been a while and it had been a long time. Finally after numerous tests I was able to totally get rid of the 502 Bad Gateway errors with nginx. The lack of documentation made it a lot more difficult to deal with… plus the fact that the majority of nginx users are Russians. There are a lot of useful hints given out here and there though. But still it used up a good amount of time before I finally figured everything out. So yeah, goodbye 502’s… and oh, along the way various tweaks were implemented which shaved off a few milliseconds from the loading times (not noticeable by the end users though). ;)

… next up is playing with “High Availability”. :)

Uncategorized , , ,

Migration to nginx on iSTORYA.NET done

December 14th, 2008

I’ve finally made all the necessary changes needed to do a complete migration of iSTORYA.NET from Apache to nginx. I will be observing the site closely in the next two days if there is anything that doesn’t work the way it should be. By the looks of it, nginx looks very promising for our needs. Load averages are a lot more desirable now and pages seems to load faster than when we only had nginx as a reverse proxy. There are still a lot of things to learn and I’ll do it as we go along.

If you notice something not working the way it should be, please post a feedback at this thread.

Uncategorized , , ,

nginx on iSTORYA.NET

December 9th, 2008

For the longest time iSTORYA.NET has always been an Apache baby. But having no money for another server and having an “obsession” for below 1 load averages I went out and searched for an alternative. Three options came up: LiteSpeed, Lighthttpd, and nginx. LiteSpeed was too expensive and Lighthttpd was too popular and too “feature” driven. I wanted something that’s stripped down to the bare necessities (of what we need at least). I decided to give nginx a try. Installation was fairly straightforward and configuration was easy too. Since I am the type who doesn’t want to wait too long for a “switch”, I gave it a try as a reverse proxy. A few days of reading about it and a few minutes putting it up, did a couple of ApacheBench tests serving a txt file and phpinfo(); script on one of our servers. I got the results below:

Stand-alone Apache (static txt file):
Concurrency Level:      100
Time taken for tests:   21.366951 seconds
Complete requests:      100000
Failed requests:        0
Write errors:           0
Total transferred:      26101044 bytes
HTML transferred:       0 bytes
Requests per second:    4680.12 [#/sec] (mean)
Time per request:       21.367 [ms] (mean)
Time per request:       0.214 [ms] (mean, across all concurrent requests)
Transfer rate:          1192.92 [Kbytes/sec] received

Apache w/nginx as reverse proxy (static txt file):
Concurrency Level:      100
Time taken for tests:   9.336450 seconds
Complete requests:      100000
Failed requests:        0
Write errors:           0
Non-2xx responses:      100018
Total transferred:      30505490 bytes
HTML transferred:       16202916 bytes
Requests per second:    10710.71 [#/sec] (mean)
Time per request:       9.336 [ms] (mean)
Time per request:       0.093 [ms] (mean, across all concurrent requests)
Transfer rate:          3190.72 [Kbytes/sec] received

Stand-alone Apache (dynamic phpinfo();):
Concurrency Level:      100
Time taken for tests:   39.655921 seconds
Complete requests:      100000
Failed requests:        15
(Connect: 0, Length: 15, Exceptions: 0)
Write errors:           0
Total transferred:      435963771 bytes
HTML transferred:       418862574 bytes
Requests per second:    2521.69 [#/sec] (mean)
Time per request:       39.656 [ms] (mean)
Time per request:       0.397 [ms] (mean, across all concurrent requests)
Transfer rate:          10735.98 [Kbytes/sec] received

Apache w/nginx as reverse proxy (dynamic phpinfo();):
Concurrency Level:      100
Time taken for tests:   33.87610 seconds
Complete requests:      100000
Failed requests:        4
(Connect: 0, Length: 4, Exceptions: 0)
Write errors:           0
Total transferred:      499292625 bytes
HTML transferred:       481491913 bytes
Requests per second:    3022.28 [#/sec] (mean)
Time per request:       33.088 [ms] (mean)
Time per request:       0.331 [ms] (mean, across all concurrent requests)
Transfer rate:          14736.33 [Kbytes/sec] received

That’s a 128% increase in RPS for static files and a notable 17% increase for dynamic pages!… after seeing the results on the test server I immediately installed and migrated it on iSTORYA.NET. Upon switching, pages seemed to fly and the server load went down below 1 most of the time from 2 on peak hours… and more importantly, the number of processes running on the server dropped by a hundred. I am happy, server is happy, Wordpress and vBulletin are happy… at least for now. I will continue to learn about nginx and hopefully be able to replace Apache completely with it. :)

Random Thoughts , , , , , ,

… a few changes for iSTORYA.NET…

December 1st, 2008

6 years and a number (countless to be precise) of changes… from the portal to the forums to the rules to the optimizations to the customizations… iSTORYA.NET has been through it all. It has gone through changes quite a bit just recently… from SMF we moved to vBulletin (Moving over to new server and vBulletin - May 25, 2008 @ 12AM)… and it didn’t stop there. We’ve changed the rules, the layout, the portal… added a few features here and there… we’ve changed (or moved) to a new server. All for what we think is going to make it better. There will be more changes coming. It may come in the form of something new, something old, or something different. As the saying goes, “The only thing permanent and constant in this world is change.”… it holds true for everything. Nothing is exempt…

For now, something that people will surely appreciate is coming… PM Limits to be increased … a lot more are planned…

Random Thoughts , , ,

The Glimpse - Photo Exhibit

November 16th, 2008

It came as a surprise to be chosen as one of the “featured” photographers for “The Glimpse” - a photo exhibit sponsored by The Photoshop. As a backgrounder, I do Macro Photography as a hobby and have been doing it on and off for the past 3-4 years.

Needless to say, there were a lot of technical (and non-technical) challenges facing me. First was the fact that my camera is only an outdated 8MP Canon 350D which technically doesn’t have enough resolution to fill a 12×18 print. Second was my inexperience with printing (yup, I only keep them on the hard drive)… plus a slew of other minor issues. With the help of my co-exhibitors, they were all addressed. First thing they suggested was that I calibrate my monitor. Second was to just resize the images and forget about the rest… pretty cool advise if you ask me. :-)

If you have time do drop by the exhibit at The Atrium of Park Mall (see poster below).

The Glimpse Photo Exhibit

The Glimpse Photo Exhibit

The featured photographers galleries:

Jan Gonzales (Conceptual Portraiture) - http://www.jangonzales.com/
Farley Baricuatro (Travel Photography) - http://www.flickr.com/photos/colloidfarl/
Gerald Yuvallos (Macro Photography) - http://www.flickr.com/photos/gyuvallos/
Joseph Ong (Fashion Photography) - http://www.flickr.com/photos/joseworks/
Lito Inso (Wedding Photography) - http://www.flickr.com/photos/litoinso/

Events , , , , , , , , , , ,

… thank you for taking a glimpse of my nothingness.

November 15th, 2008

Welcome to my very first “actively updated” blog (if I don’t keep it active, vern is going to shoot me). ;-)

With that I say thank you for taking time to read this “nonsense“. You will, in the coming days, see a glimpse of me. I am not the best writer around so I won’t dwell on a single topic. Everything will be random…

Random Thoughts