10

I recently ran into gwan (http://gwan.ch) a free web server that according to many seem to be frightfully fast. I am not very keen on the C based scripting but I wanted to use it to serve static contents. I did see a thread in ./ on using gwan

http://tech.slashdot.org/story/09/11/29/2133243/g-wan-another-free-web-server

Anybody with real world experience in running gwan in production? Any best practices ?

vivekv
  • 2,238
  • 3
  • 23
  • 37
  • I have no experience with G-WAN, but look very closely at their performance claims. Their [benchmarks](http://gwan.ch/faq#benchmarks) are often about serving 100 byte static files. When they compare dynamic content, G-WAN is running C code while others are using other languages rendering the benchmarks useless. – Schwern May 07 '12 at 05:35
  • 3
    @Schwern: Here are benchmarks in Java: http://gwan.ch/source/loan.java and C scripts are to be compared to Nginx or Apache modules (features that very few would call "useless"). – Gil May 17 '12 at 16:32
  • 1
    @Gil The benchmark is heavily flawed. 1) GWAN and Tomcat are running different programs, 2) its only vs Tomcat, 3) the loan.java code has embedded HTML in a single routine which would never make prodution, 4) they keep testing localhost which ignores how good their network code is, 5) are both similarly configured, particularly are they both logging requests, we don't know 6) what machine 7) what operating system 8) what Java, and is it the same JVM? GWAN might be really fast, but their benchmarks leave a lot to be desired. – Schwern May 18 '12 at 02:29
  • @Schwern: 1) G-WAN's loan is compared to TomCat's hello world (guess which is harder), the test is fully-documented here: http://gwan.ch/source/ab.c, and hey, point another JAVA server able to serve more than 500k requests per second - whatever the payload. You dishonesty is quite remarkable. – Gil May 18 '12 at 12:31
  • 3
    @Gil Good benchmarks are not about guessing, they are about eliminating variables. There are just too many variables in the GWAN benchmarks. Why not just run the same code and eliminate doubt? `ab.c` does not answer my questions about how the servers are configured, are about a different test than your previous one, and again compare different servers running different code written in different languages (GWAN with C, Apache with PHP, etc...). GWAN is probably impressively fast for specific situations but their muddled benchmarks hold them back. – Schwern May 18 '12 at 18:54
  • If you had **read** ab.c then you could not write this. But your goal is so obviously far away from informing people that there is no point to give you any pointer: *"It's difficult to get a man to understand something when his salary depends on him not understanding it."*. – Gil May 20 '12 at 06:37
  • 1
    @vivekv: my company ran it on two servers for some time. Exclusively to serve big (30..120 MiB) static files. It worked in the beginning but then we experienced spurious crashes and also issues due to package updates that we expected to be unrelated (but that had a side-effect). It was as fast as advertised, but then nginx offers the same throughput for static files, is open source and comes pre-packaged for Debian. We moved back to nginx some months after the problems began. – 0xC0000022L Jan 04 '16 at 15:58

1 Answers1

8

I am not very keen on the C based scripting

G-WAN offers scripts in Java, Scala, PH7, Go, Perl, Python, Ruby, C++, C#, D and Objective-C (not only C).

Anybody with real world experience in running gwan in production?

We do (I am part of the G-WAN team) but for more than 3 years now we have registered (and non-registered) users who ask us advices about how to better tune G-WAN for their needs, or how to develop G-WAN scripts or handlers.

They range from 'old' traditional business like accounting (service provider) or yellow-pages to cutting-edge Web application like trading or online-games.

Recently there is a new interest to involve G-WAN for huge distributed databases - something that G-WAN was created for (as we use it for Global-WAN).

Any best practices ?

This is a too broad question to be answered in a couple of lines.

Don't try to duplicate what you were doing with other servers: there's usually a much simpler way to do things with G-WAN (example of this are the FLV and rewrite handler examples published here).

Try to keep things simple. You always win by respecting this rule.

Gil
  • 3,279
  • 1
  • 15
  • 25
  • 1
    Gil - thanks for the note. The popular feedback I have heard so far is that Gwan is not a general purpose Webserver but designed for specific tasks (such as small static file serving) where it really excels. secondly not being open source is a big concern for many. Curious to hear what your thoughts are on this. – vivekv May 19 '12 at 00:31
  • @Vivekv: G-WAN supports **scripts in Java, C, C++, D and Objective-C** with a rich API (including Comet) so it can hardly be described *merely* "serving small static files". And this information is visible on its website frontpage so there is really no need to 'opinions' in this matter. – Gil May 20 '12 at 06:34