Inside Out

  • Home
  • Categories
    • communities
    • Design
    • Events
    • General
    • inside
    • Links
    • oooday
    • Products
    • SEO
    • Social Media
    • Technology
    • Usability
  • Subscribe via RSS

The Squid is dead, long live to the NginX!

Boby Seilles    August 22nd, 2008
   Boby Seilles
   Published in Technology  |  No Comments

Hi, I am Boby, a frenchie working for TheNetcircle since 3 years and i act now as technical lead. So this is my first article and i hope the beginning of a long serie of technical ones. I won’t be the only one writing in this category; i will try to push other workmates to share their knowledge and experience. For this article i am going to talk about our main issue at the moment, which solution we chose and why. Hope you will enjoy it.

We are currently busy developing a new version of our main website, a very special dating community. It is quite a success, we have 2 millions registered users and at peak hours around 20,000 concurrent users browsing the site. To serve this traffic we are using 50 machines like databases, static servers, php servers… All those have to be organized to achieve scalabilty and a kind of high availability.

Since 2 years we are using a very traditional setup. We wanted to separate the traffic between static and dynamic content, as it is better to optimize. We had then 2 clusters: one for static content using Lighttpd and one for dynamic content using Apache server.  For each cluster there is a loadbalancer in front, currently LVS. And on top of that we have several Squids which forward the requests to the appropriate cluster. The Squid in this case was just using as reverse proxy and forwarding, no caching as the Lighttpds are fast enough to deliver the content (in fact putting a squid in front of them was more a drawback than anything else). Some static content is served directly from the loadbalancer using another domain name; still for AJAX requests the static content has to be under the same domain name.

Here is the layout as described:

Old servers layout using squid

Old servers layout using squid

Every layer scales; the Squids by DNS round robin, the rest by LVS and up to now this was working fine. Still it is a lot of physical servers and it would be nice to reduce it to ease the maintenance and reduce our expenses; especially with the new version of the site coming, we could spend some time experimenting.

We started by the Squid. By looking at his load we noticed that it was only using one CPU, letting the other one collecting dust. Squid is not multi-threaded and except launching 2 instances of it, there won’t be any benefit of running it on any modern CPUs. We then looked for other solutions; first very old redirection daemons, then incomplete Squid wannabes and finally lightweight HTTP servers. That is where we found NginX.

NginX is, as they said, “a free, open-source, high-performance HTTP server and reverse proxy, as well as an IMAP/POP3 proxy server”. As we heard before by browsing some ruby forums, “Nginx is known for its stability, rich feature set, simple configuration, and low resource consumption”. The best of Russian hacking, that is so badass; we had to try it. After playing with it a while, we noticed that not only it will replace efficiently our forwarding Squids but its features could cover most of our requirements for the site.

  • Request forwarding: That was our main focus at first and there is a module rewrite. It is using a simple but elaborate syntax which allow conditional statement, include of a set of rules and real POSIX REGEX rules. This was a big change compared to pseudo REGEX rules used by Asqredir as the Squid used to be configured. After rewriting our current rules, we had a more organized configuration and no rules duplication. For sure there was some limitations as the rewriting language is sometimes too simple (not more than 9 variables can be used), but nothing blocking or which would have killed our enthusiasm.
  • Load balancing: Simple loadbalancing is natively included in NginX. For each domains you want to loadbalance you specified the IP and here you go. Bye bye LVS.
  • Static server: As Lighttpd, NginX is an asynchronous lightweight HTTP server. So it will just deliver as fast as it can any static content and no need for caching. Adios Lighttpd.

Here is what the layout looks like then:

New servers layout using NginX

New servers layout using NginX

Much simpler and less machines, which means less maintenance and less hosting fees. Several NginX with DNS round robin, also IP fail over to be safe and it is ready for production. Well we still need more test, configuration tuning but from what we have seen we are confident.

Manga your office

Tine    August 21st, 2008
   Tine
   Published in inside  |  1 Comment

As I really enjoy faceyourmanga and joined a group on flickr to post your avatars I came up with the idea to manga the whole office. That might take a while, but you’ll find the result on the “the NetCircle collection” on flickr. Here are the examples so far:

So please my colleagues send me your Mangas or life with what I choose for you. :P

unintended Linux advertisement

Tine    August 20th, 2008
   Tine
   Published in Technology  |  No Comments

I thought it´s funny enough to take a picture of the big billboard in Shanghai with this unintended advertisement, but I recently found out that there are people who actually find it a lot more funny and so I´ll share it here with you.

unintended Linux advertisement

unintended Linux advertisement

Big post Olympic theNetCircle Pool Tournament

Tine    August 19th, 2008
   Tine
   Published in Events  |  1 Comment

Being in a very sporty mood these days, we decided to host the Big Post Olympic Pool Tournament (BPOPT). The exact date will be announced soon. So if you happen to be in Shanghai and feel like hanging out at our office at Suzhou Creek, have a beer or two and challenge us in the pool tournament drop me a line. I’ll keep you informed about the details.

8-BALL Standardized World Rules

1. OBJECT OF THE GAME. Eight Ball is a call shot game played with a cue ball and fifteen object balls, numbered 1 through 15. One player must pocket balls of the group numbered 1 through 7 (solid colors), while the other player has 9 thru 15 (stripes). THE PLAYER POCKETING HIS GROUP FIRST AND THEN LEGALLY POCKETING THE 8-BALL WINS THE GAME.

Continue reading →

The first priority of a form: It needs to work!

Tine    August 18th, 2008
   Tine
   Published in Design, Social Media, Usability  |  No Comments

I tried to sign up for Linkarena a German social bookmarking site and encountered the following problems. In fact 2 of 4 fields came up with very creative error messages:

1. User name: green -> not taken. great.

2. Email address: “steiss@gmail.com is not a valid email address…”
WHAT??? I’m using it for years now and I have no clue what your tool dislikes about my email address.

3. Password: It’s secure. great.

4. Repeat your Password: “It’s not a valid email address”
Why am I not surprised?

Dear Linkarena,
I really like your form. It’s easy, short, plain. A great form when you look at it. I like the functionalities, like checking if the User name is still available and so on. This might not happen all the time, but still it seems to happen. So please make my life easier and your form more effective by making it work.

In the Office Day Documentation 14.08.2008

Tine    August 18th, 2008
   Tine
   Published in inside, oooday  |  3 Comments

This week’s “out of Office Day” became a “in the Office day” which was a wise decision. Here in Shanghai it was raining like hell. Rain in Shanghai limits your radius of action to how far you are willing to walk in the rain, because it gets really hard to find a taxi.

oooday

Turned out to be a classical Beer, Pizza und Computergames evening.

An army of German clones

Tine    August 14th, 2008
   Tine
   Published in Products  |  2 Comments

You can get pregnant AND high, with just one dish!

picture by MFinChina

Most people on the Internet speak English. Every English site sooner or later gets it’s German clone. So theres a fight between the English speaking Original being translated into German wanting its piece of the German pie and the “original German” clone. Sometimes the German clone even adds English and tries to enter the territory of the original.Ok obviously that’s not new. TechCrunch for example had an article on that topic about 1 Million years ago.

As German is the 5th mostly used language this totally makes sense to me because the market is there. No.2 to 4 are Chinese, Spanish and Japanese. I’m very sure about China and Japan clones as the situation is very similar to the German speaking area.  China and Japan are not only united by their language but they are also one country. Austria, parts of Swiss and Germany have more or less one language but they tend to prefer products adopted to the country. I assume thats similar for Spanish.

That’s the theory so far as we also see it in the facebook vs StudiVZ fight. So get some sort of idea how my cliché fits reality I made a short list comparing some sites to some clones also regarding if they are available in German and/ or English.

Type
English
in German too
in English too
German
News
Digg no
no
Yigg
Bookmarks
del.icio.us no
yes
mister-wong
Reviews
Yelp no
yes
Qype
Marketplace
etsy
no
yes
Dawanda
Microblogging
Twitter no
no
frazr
Documentsharing
Scribd
no
no
Doctus
Photosharing
Flickr yes
yes
Photocase
Videosharing
YouTube yes
yes
sevenload
Blogging
Blogger.com
yes
yes
blog.de
Books
LibraryThing yes
no
lovelybooks
Travel
Trip Advisor yes
yes
holidaycheck
Professional
LinkedIn no
yes
xing
Classmates
Classmates yes
yes
stayfriends
Misc MySpace no
no
unddu

Facebook yes
no
studiVZ

friendfeed
no
no
freundenews

As we see in the chart about half of the sites don’t offer a multilingual choice. I’m aware that this is not really representative and sites like Twitter don’t really need to be translated (even though in this case it wouldn’t be that much work). Still regarding the internationalization, globalisation isn’t that surprising? I have the feeling that most sites which now offer multi languages did that a while after they launched their original product.

Is it still common to build your product just for your local market? Isn’t it some sort of startup mentality to think big and according to that we need to implement multi languages right at the beginning? My feeling is that this is changing right now and to me that’s a good choice. All or nothing right? Or did it start to change long ago and I just missed it?

Also interesting in this context is the GDP by Language 1975-2010 chart and MFinChina’s flickr page.

Olympics: Where do you watch the opening Ceremony?

Tine    August 8th, 2008
   Tine
   Published in General  |  No Comments

If you watch it at all.

I remember “Public viewing” in Germany for all the football events. So I was searching for something similar here in Shanghai. I’ve heard that many people will gather at people square but considering that about 20 million people are living here that might not be enough.

So what do people do? What do you do? Are you going to watch it? If yes, where?

I’m living in China now for a while but I’m still not sure what to expect from the Olympics. Anything can happen. I’m very curious. A lot of “strange” things already happened. So I’ll watch it for sure. Coworkers/ friends will gather and watch it while having a BBQ on the rooftop.

My personal social media chaos

Tine    August 6th, 2008
   Tine
   Published in Social Media  |  No Comments

Yesterday I tried to explain social media to a friend and ended up confusing everybody. Inspired by ProBloggers Social Media Love in I drew a chart, sorting out my social media services and their connections:

social media connections

social media connections

To me that looks like a lot but whoever uses that stuff know that thats easy to handle. But I didn’t put everything in the chat. Just the stuff I use on a daily basis. There’s a Xing Account, Google Reader, Seesmic, nowpublic, neon where I sign in every now and then and about one million pages I signed up for and forgot about long ago.

Looking at this pic I get afraid of loops. A notification of a notification of a notification …

And yet I’m only using a tiny bit of the social media possibilities. Friendfeed offers to import 43 different services atm. Yeah I love new stuff, I love variety but somtimes I secretly dream about one service for everything and I mean everything. Well, I still only have one device ok two a computer at work and my laptop at home. But this might change soon. Anyone who bought a new iPhone and wants to get rid of the old one?

Ping me! You have about 20 channels to choose from, if you are lucky enough to have all my information:

  1. skype
  2. msn at work
  3. ICQ at work
  4. mobile phone china
  5. mobile phone germany
  6. phone at work
  7. twitter (Herr_Bert)
  8. stumpleupon
  9. delicious
  10. friendfeed (herrbert)
  11. facebook
  12. xing
  13. youtube
  14. flickr
  15. gmail
  16. gmx
  17. E-Mail at work
  18. librarything
  19. private blog
  20. company blog

I might have missed something but I think you got my point.

Out Of Office Day Documentation 31.07.2008

Tine    August 4th, 2008
   Tine
   Published in inside  |  No Comments

The NetCircle Team at Teppanyaki. The place is called Gintei. It offers All you can eat/ All you can drink. Which is a good start for a funny evening. It was also a Goodbye for our Chinese and English Teacher Luca who is about to conquer North America with her endless patience. Thanks for everything!!!

Team oooday

I personally stuffed myself with sashimi and the steak with fried garlic. I also recommend the honey chicken or the ginger pork. Alas I not sure what the guys are doing. Maybe drinking a imaginary Sakebomb.

Claude and Sam

Despite the vague suspicion that sakebombs were involved the evening was all about having fun …and maybe drinking …but mostly having fun.

curtis and lane

See you in two weeks for the next theNetCircle Out Of Office Day.

About Inside Out

This is Inside Out, a blog by The NetCircle about development, design, business, experience, the web, and more.

Recent Posts

  • The Squid is dead, long live to the NginX!
  • Manga your office
  • unintended Linux advertisement
  • Big post Olympic theNetCircle Pool Tournament
  • The first priority of a form: It needs to work!

Recent Comments

  • Tine on An army of German clones
  • Katharina on An army of German clones
  • Matt on Big post Olympic theNetCircle Pool Tournament
  • Kristi on Manga your office
  • Claude on In the Office Day Documentation 14.08.2008

Contributors

  • Boby Seilles
  • Claude Ritter
  • Niko Spiridis
  • Tine

Popular

  • PHP Usergroup Shanghai Meetup in March
  • Asian McDonalds Products in Germany and also in China?
  • FontStruct 2nd try
  • In the Office Day Documentation 14.08.2008
  • An army of German clones
  • northernvoice 2008
  • The Suxorz: The Worst Ten Social Media Ad Campaigns of 2007 @ SXSW
  • Breakup 2.0 @ SXSW
  • Social Media Metrics
  • Big post Olympic theNetCircle Pool Tournament
  • Blogroll

    • chrisbrogan
      Community and Social Media
    • Darren Rowse - problogger
      blogging and social media
  • Links

    • The NetCircle


  • ©2008 Inside Out
    Powered by WordPress using the Gridline Lite theme.