Your browser (Internet Explorer 6) is out of date. It has known security flaws and may not display all features of this and other websites. Learn how to update your browser.
X

Archive for October, 2011

Aside

New Dogster Stickers!

Dogster is giving away their new stickers!

Same thing, just send them a self-addressed, stamped envelope if you are in the USA.
If you are not in the US of A, like me, you can send them an International Reply Coupon together with the self-addressed envelope.

And since I’m gonna mail them the IRC, I might as well send some stuff together. Pictures of my two sweeties. 😀

Also, they are having a photo competition of sorts. Once you have got the stickers and found an awesome place to stick them, take a photo and send it to them. The best photo will get featured in their blog!

Aside

Fading Ink

It seems like the Lamy T10 black ink fades pretty easily. Stuff that I wrote a few weeks back have faded to a greyish-brown colour instead of the original black colour…

Another thing I notice was that the ink’s solvent (I think…) seems to oxidize or something when it is exposed to air, turning into a yellowish stain.

Pen Ink

On the left is the Lamy T10 Black ink that came with my Lamy Al-Star and on the right is the Pelikan Brilliant Black that I filled into my Hero 336.

The paper was soaked by placing the nib on the paper for a while, letting it flow out.

Did I get an imitation ink, or are all Lamy T10 Black ink like that?

Image

Best Friend

Best Friend

Aside

Apache Load Balancing and Session Stickiness with Tomcat

Me and my colleague were trying to set up an Apache load balancer yesterday to balance the connections to a pair of Tomcat servers. As we were balancing connections to application servers, one of the main requirements was to maintain session stickiness when routing the connections.

Most articles on the internet are dealing with load balancers serving static or session-insensitive pages. So it took us quite a while to figure out how to setup what we wanted. We went through countless articles and tutorials teaching us to set up simple load balancing functions on the Apache web server. And we followed those instructions to the word and still can’t get session stickiness to work…

That is, until we stumble across this goldmine!

Near the bottom of the tutorial was the magic that made everything work, the configuration to the Tomcat server. Seems like not many people on the internet have to deal with Apache load balancing to Tomcat with session stickiness as none of them mentioned anything about configuring the Tomcat. (either that, or we are pretty stupid and clueless about Apache and Tomcat… we are n00bs afterall) The articles and tutorials just casually mention the “route” parameter and then move on to the rest of balancing configurations.

So, to configure an Apache load balancer with session stickiness to Tomcat, you first have to configure the Apache webserver:

LoadModules proxy_module mod_proxy.so
LoadModules proxy_http_module mod_proxy_http.so
LoadModules proxy_balancer_module mod_proxy_balancer.so

ProxyRequests Off
ProxyPreserveHost On

apacheLB>
BalancerMember http://server1:8080 route=http1
BalancerMember http://server2:8080 route=http2
</Proxy>

ProxyPass /examples balancer://apacheLB/examples stickysession=JSESSIONID
ProxyPassReverse  /examples balancer://apacheLB/examples

The first 3 lines will load the necessary modules for a Proxy HTTP Load Balancer in Apache.

“ProxyRequests Off” will turn off the forward proxy function of Apache as we are only interested in the reverse proxy function.
“ProxyPreserveHost On” will preserve the host header to the proxied host.

The Proxy stanza is where you define the members of the load balancer pool and the name of the balancer url. Note value of the “route” parameter,  you can set it to whatever name you want as long as it is unique, you will need this in the Tomcat configuration. You can also set some load balancing parameters like the lbmethods, the retry timeout, the lb weightage and so on. You can find out more in the mod_proxy documentation.

You define the load balancer like any other Apache Reverse Proxy, the only difference is in the mapping. In a regular reverse proxy, you’ll map the application context to a specific server. But in the case of a Load Balancer, you map the application context to a balancer url, as defined in the Proxy stanza. Note the “stickysession” parameter, this is to define the session name. In the case of a Tomcat server, we’ll use “JSESSIONID”.

Next, you have to configure the Tomcat servers, in the server.xml configuration file:

# In Server 1 server.xml
<Engine name="Catalina" defaultHost="server1" jvmRoute="http1">

# In Server 2 server.xml
<Engine name="Catalina" defaultHost="server2" jvmRoute="http2">

Locate the “Engine” tag in the server.xml file of each Tomcat server or instance and add in a “jvmRoute” parameter. Make sure the value of the “jvmRoute” parameter is the same as the one defined in the Apache configuration file for each server.

And, you are done! A simple Apache load balancer with session stickiness to Tomcat servers.

Aside

Nike We Run SG 10K

Nike We Run SG 10K

Today was the Nike We Run SG 10K event, the one which 12,000 slots were fully registered within two days of registration opening. Quite a few of my friends were exclaiming that they didn’t get to register in time for the race. Well… For Nike running events in Singapore, you can’t really mull over the registration, you gotta decide fast.

The race expo was last weekend over at Orchard Central. Reach there around 7pm sharp and boy, was there a long queue already. The race pack was quite sparse, a race tee (that’s what most people signed up for), a race tag, a Nike water bottle and an event info sheet.

Nike We Run 10K Tee

Fast forward to today’s race. Well… It didn’t really get off to a very good start… Early in the morning, SMRT had a delay in their service… I waited for quite a while at Lakeside for the east-bound train and it didn’t arrive till 6:10am… And after Jurong East Station, the train was like a weekday peak hour train, packed to the brim… Was suppose to meet up with my friend Kenny at [email protected] to put all the barang-barang in his car before heading to the race village… But due to the train delay, had to meet him straight at the race village…

Not sure if it was due to the train delay that there was a huge crowd moving off at Kallang station, but it seems like that event was ill-equipped to handle large crowds… There were many chokepoints and funnelling of crowds… Especially bad was at the entrance into the race village and the path towards the starting pen. Why would you funnel a large crowd into a small pathway? I don’t quite understand on that…

The run itself was quite pleasant. Large crowds, but the paths were wide, spacious and well, proper paths. Unlike a certain run where there were funneling of crowds, mixture of paths and trails, dimly lit paths… (*cough*AHM*cough*) Lots of overtaking within tight spaces, due to the large crowd and I believe also due to people not really prepared for the run.

This year’s finisher’s item is a Keychain/Flashdrive. At first I thought it was just a normal keychain (cheapskate!), until Kenny told me that it’s a flashdrive too! Well… It’s only 2GB, but still much more useful than a just a keychain.

Nike We Run SG 10K Finisher's Item

All the usual stuff at the Finishing Point/Race Village, 100Plus, Ice Mountain (mineral water), banana, massage points (Salon Plus mostly…) and in addition, ice cream! Not sure if eating ice cream after a run is a good idea… Didn’t queue for it, too long…

Headed down to [email protected] for a swim and jacuzzi after the run. Man, it was awesome! The view, the swim and the jacuzzi itself. The water jet was just nice~ A good water jet massage after a run, hah.

Southbank@Lavender Infinity Pool

My next run will be the Newton 2011 Run. 30KM… Oh shit…

Aside

$1.20 Fountain Pen

Look what I found!

A SG$1.20 Hero 336 fountain pen! Who knew a fountain pen could be that cheap!
Well, it is a cheap pen meant for the masses. According to this website, it was released during the Cultural Revolution as a means for the lower classed to own a fountain pen. But still, $1.20?! Heck, it’s cheaper than most Pilot Pens…

Got this pen at Mustafa (damn! they sell everything there!), on the first level pen section, next to the sub $1000 Montblancs (hah!)

Forgot to get ink though… Gonna go buy some later.