Mar 052014
 

I just could not make it work although it seems pretty easy and straightforward.

I have a machine with 4 IPs (216.x.x.203~206), and start Apache listening on 1203~1206 for each IP, then for each VirtualHost (such as 216.x.x.203:1203) I turn on ProxyRequests, and set ProxySourceAddress to that IP address, thus client connecting to 203 will have their request go out through 203 as well. Continue reading »

Feb 052014
 

I accidentally changed some configuration of a VM and it refused to start after reboot, I know I can simply revert what I changed to make it works again so to avoid recovery process, and I found this great article which described exactly what I want. I’m going to repeat the steps here as I also need to write steps to unmount. Note that you need to have kpartx installed. Continue reading »

Jan 302014
 

I had two servers that always run at 100Mbps, which was OK but whenever I turned them to GlusterFS bricks, things became obviously not working.

It sounds like simple, right? Yea, I tried ethtool to force them running on GigE, didn’t work; I tried to change to another switch port, didn’t work … after blocking myself from the servers for several times (ethtool!), I finally decided to change to use 2nd NIC on those two servers. They were good, running at GigE immediately after plugging into the switch. Continue reading »

Jan 272014
 

Finally I got some time playing with GlusterFS and libvirt.

I’m not going to step into GlusterFS setup as it’s really easy and straight forward, I did CentOS kickstart (non-attendance) installation as well since it may help me in future deployment. Note that I assume you have glusterd running the host node, other all localhost below should be replaced by the hostname that is running glusterd. Continue reading »

Jan 152014
 

Search team is doing crawling and some web sites are heavily using JavaScript to generate content. Whenever I said “heavily” I mean none of the UI elements was from HTML, instead, JavaScript runs after the page loaded, then shown to users.

I’m doing a prototype so that they can take as a reference and later on do something fit into their system better. The prototype as based on PhantomJS, it was in Ubuntu (12.04 LTS) repository which makes my life much easier. Again, I need to install xvfb so that I can run X-based application in command line. Continue reading »

Jan 132014
 

I’m working on migrate office LAN from one subnet to another subnet, it brings lots of network inter-connection issues, and it seems iptable is Swiss knife that can solve anything :P.

One case is that I need to let machines in new subnet accessing the old subnet, since the dump router is busy enough to handle uplink and VPN and port forwarding, I decided to use a Linux box to get things done, all that I did: Continue reading »

Jan 032014
 

Finally I decide to turn on console on all my VMs so that I don’t have to rely on VNC for remote access whenever network is having problem – I’m trying to join corp network now and there are lots of network glitches during last week and I believe there will still be some in the coming week.

Actually it’s not that complicated, on CentOS (5 or 6) machines, add following line to /etc/inittab (do a dmesg | grep tty to make sure it is ttyS0 for you, but I believe they are all the same for kvm based VMs): Continue reading »

Oct 312013
 

Alright, a quick summary on XMPP before Halloween ๐Ÿ˜‰

ejabberd is up and running with 3 nodes in the cluster, and having data replicated to all 3 nodes thus service will be up and running as long as there is at least one node alive. With SleekXMPP created 5M which is much faster then ejabberdctl, created 10,000 pubsub nodes so that I can do announcement to user groups, but seems I need to recreate them as they are currently all belong to admin account, which does not fit into real world. pubsub is working as well, but I need to find another solution with better performance – it’s current about 1 subscribe/second, and seems most time was spent on authentication, so I need a feature of “subscribe for others” to speed up the test deployment, though this is not necessary in real production. I haven’t test publishing information yet. Continue reading »

Oct 142013
 

Time to play with HA ejabberd setup now.

It was said number of daily active user will be less than 1M, and IM is just a feature of the mobile product, and believe that people will spend less then 2 hours on it everyday, also people will use the App mainly during traffic hours. So it’s 2M hours span to 7~9am and 6~8pm, 4 hours. I would like to assume it is evenly distributed, this makes the concurrent online user … 500K, Not a big number, and since it is just a non-key feature, so activities will be limited.

So I think I’d go with a full replicated ejabberd cluster, “full” means I’m going to replicate everything – password, roster, offline message. I will check the stats of the production environment to see how the resource utilization is going, and tune the allocation whenever necessary. Continue reading »