News for hackers. Stuff that matters.
Re:Nginx Is Taking Over the Internet by lkrubner on Friday September 06, 2013 @11:06AM (#6340791)
For my style of coding, and I think many others, Nginx has become dominant because it enables fast reverse proxy. And I think for many large websites it ahs become common to build websites out of many small apps, which run on different ports and which Nginx then knits together.

An example. Assuming you have the domain “example.com” then you might have an app that handles user login and you spin that up on, say, port 30000 and you map it to port 80 such that is appears as:

http://www.example.com/login

You might also have an app that handles user signups which you spin up on port 30001 and you map to port 80 such that it appears as:

http://www.example.com/signup

You might also have an admin app that you spin up on port 30002 and you map to

http://admin.example.com/

You might also have an app that allows users to update their profile information and you spin that up on port 30003 and map that to

http://www.example.com/profile

And you might have an app that publishes much of your content as static HTML files, which you spin up on no port, as it does not accept TCP/IP requests — instead it queries the database and then creates static html files, which you save to some directory such as /var/www/example.com/public_html/ and you map that to

http://www.example.com/

You can see how this gives the sysadmins a lot of freedom to spread load across servers in creative ways — if 1 app becomes especially popular, or resource hungry, the sysadmins can rather easily move it to its own server (or set of servers). This is one of the main reasons most big sites move to an architecture like this — it facilitates fine grained control of what sort of requests go to a particular server.

This is a flexible style and it allows small, maintainable apps. By contrast, consider web development circa 2001, when many people felt it was enough to put a big blob of PHP in a directory and let Apache serve it as one big app.

Nginx's fast reverse proxy allows developers to focus on building their apps, without having to worry too much the server details. It also offers a cleaner separation between concerns that should worry programmers and concerns that should worry the sysadmins.

(A final point: in my own apps, for information that needs to be shared quickly across apps, like which users are logged in, I use ZeroMQ to knit the apps together.)

Re:Nginx Is Taking Over the Internet by Nux on Friday September 06, 2013 @06:59PM (#6343135)
Dude, what are you rambling about? The same can be achieved in Apache with 2 config lines.

Nginx has taken over some of Apache's market because it's lighter on resources, i.e. with the same amount of resources it can process & deliver more stuff.

Regarding functionality and configuration there is not much difference, actually I think Apache still has the edge here.

Re:Nginx Is Taking Over the Internet by rehack on Saturday September 07, 2013 @04:36AM (#6344404)
>Nginx has taken over some of Apache's market because it's lighter on resources, i.e. with the same amount of resources it can process & deliver more stuff.

That's precisely why we moved to Nginx. We do mostly Java so Apache was not the problem there, as it was simply proxying over to Jettys.

But the blog is wordpress that means PHP, so we had to use modphp modules with Apache. That was Okay initially, but as we scaled, we saw some 50 instances of Apache and each taking 25 Mb memory. And note, most of the bloat in memory was due to modphp being loaded in-memory in each instance.

We moved to Nginx with an external php-fpm for PHP, and just 4 Nginx instances take up the entire load and each uses some 2.5 Mb of memory.

And at the same time Google webmaster shows a significant drop in average latency.

So that's our experience of why we moved to Nginx.

Edit: typo

Re:Nginx Is Taking Over the Internet by xist on Saturday September 07, 2013 @07:05PM (#6346979)
I hear this a lot about Apache and there's one thing I'm not sure a lot of people understand... it's SHARED memory in most cases. While it spawns several processes (depending on which worker method), it's not as awful as it looks at first glance.

A quick google search finds a nitty gritty page that might help - http://foertsch.name/ModPerl-Tricks/Measuring-memory-consump... there's probably better examples.

Yes nginx does have lower memory usage, but on most non vps/shared servers this is a lot less of a concern than most people think vs Apache.

php-fm works great with Apache as well and probably accounts for the huge resource gain over mod_php that Apache uses by default.

Re:Nginx Is Taking Over the Internet by thwarted on Sunday September 08, 2013 @05:08PM (#6350346)
I hear this a lot about Apache and there's one thing I'm not sure a lot of people understand... it's SHARED memory in most cases. While it spawns several processes (depending on which worker method), it's not as awful as it looks at first glance.

Apache, and specifically mod_php, doesn't have that level of control over memory usage (mod_perl (and, incidentally, mod_python) has deeper integration with Apache to encourage, with the right configuration, more of the memory to be shared between processes, but it's still not that great). The Apache parent process, primarily exists to do process, signal, and socket management, it's not really possible to do a lot of application level (pre)processing before subprocesses are forked off, which is what would be required to share a significant portion of the address space.

If you have a .php file run via mod_php that looks like this:

    $x="";
    for ($a=0;$a<(1024*1024*100);$a++) {
      $x.="1";
    }
This will produce 100MB of non-shared memory in a child process, when the request is made and serviced by that child. And, because of the way requests are dispatched to children, at a low request rate the same child could end up serving all (or a majority of) requests. This unbalances the memory usage between processes.

A quick google search finds a nitty gritty page that might help - http://foertsch.name/ModPerl-Tricks/Measuring-memory-consump.... there's probably better examples.

That is a great link in general for how shared memory and COW works.

Re:Nginx Is Taking Over the Internet by thwarted on Saturday September 07, 2013 @04:46AM (#6344435)
So you've moved the memory usage from the web server proper to the external php-fpm processes, which are most likely getting recycled more frequently than the default settings for apache prefork workers are so you're not seeing the ballooning PHP memory usage. The size of the 50 instances of Apache each taking 25 meg is most likely because of the PHP code and mod_php, not because of Apache itself.
Re:Nginx Is Taking Over the Internet by rehack on Saturday September 07, 2013 @04:59AM (#6344468)
Agreed. In hindsight, I am sure, we could have externalized the PHP with Apache as well. But the larger context of this move was doing more with less. And Nginx just working with 4 instances and serving just as much, with a reduced average latency of page load, justified the move.

And I sort of felt sad doing this. Because I have a huge respect for Apache. I hope just like what Chrome did to Firefox, Nginx does to Apache, and its a win-win for all.

Re:Nginx Is Taking Over the Internet by thwarted on Saturday September 07, 2013 @03:54PM (#6346351)
But the larger context of this move was doing more with less. And Nginx just working with 4 instances and serving just as much, with a reduced average latency of page load, justified the move.

"More with less" here is a judgement call. You've increased the number of processes and subsystems that need to be managed (nginx + php_fpm), which is more. You've increased the context switching when dynamic requests need to be passed to another process and proxied through nginx. The communication between the frontend web server and php_fpm needs to be serialized in some fashion, so you're now incurring a greater than 1x cost in processing and parsing things like HTTP headers and the request (serializing and deserializing the data to pass that between the processes). It seems you're ignoring the actual cost of running dynamic PHP code because the cost has been moved out of the "web server", the thing that listens on port 80, and into something that isn't considered "a web server", but this is just a change in bookkeeping.

Do you know where that reduced average latency is coming from? Is it because nginx is serving static assets that would tie up an apache worker that could be running/serving PHP in apache? If so, you can do the same thing by offloading all your static asset serving to another server (or a completely external CDN, which has other extremely beneficial client-side advantages too) using apache too. That is, the choice of software here isn't as big a win as presented, it's the architecture of the ecosystem that is the big influence.

It's great that you found something that works better for your workload, and it's appropriate to use what works and not get bogged down in why all the time. But the way you've presented it doesn't indicate well that all the causes and effects are completely understood. And I think this ends up giving Apache a bad rap.

Re:Nginx Is Taking Over the Internet by rehack on Sunday September 08, 2013 @11:51AM (#6349101)
>Do you know where that reduced average latency is coming from? Is it because nginx is serving static assets that would tie up an apache worker that could be running/serving PHP in apache? If so, you can do the same thing by offloading all your static asset serving to another server (or a completely external CDN, which has other extremely beneficial client-side advantages too) using apache too. That is, the choice of software here isn't as big a win as presented, it's the architecture of the ecosystem that is the big influence.

Yes, I understand that. I have studied about the C10K problem[1]. And have coded another service which just uses libevent[2] directly and some C++ code to serve a feature for our site very low latency. So I understand quite well why Nginx is offering low latency.

As you rightly observe later on, I don't have the luxury to get obsessed with all the Whys, so often shoot for the major architectural gain and take any side effects that come along in the stride.

>.. But the way you've presented it doesn't indicate well that all the causes and effects are completely understood. And I think this ends up giving Apache a bad rap.

I am surprised by your this observation. I have been 100% honest in what I wrote above, and I repeat have a huge respect and thankful for the Apache team and Apache web server software. Just that, by the page loading gains we got, were clearly very good. And also there were less errors in general reported in the web master. So we stuck with the change.

Also a point regarding the switching costs and extra processing between php-fpm and Nginx processes. As I said in my first comment, we do mainly Java and PHP is just for the blog. But I very clearly remember seeing all the Apache child procs bloating to 25 Mb after the first hit to the PHP code was done. So I am actually saving by externalizing on the resources. Trust me I know what I am doing.

Another tangential thing not related to Nginx, which I am doing for low resource consumption. Is moving some relevant code from Java to Go. And there also am seeing huge memory gains (i.e. savings). Perhaps will share more about it at an appropriate time.

[1] http://www.kegel.com/c10k.html

[2] libevent.org

Edit: grammar

Re:Nginx Is Taking Over the Internet by thwarted on Sunday September 08, 2013 @04:43PM (#6350233)
I am surprised by your this observation. I have been 100% honest in what I wrote above... Trust me I know what I am doing.

Sorry, I didn't mean to suggest that you weren't being honest or that you didn't know what you were doing.

I'm sure we've all had to deal with "Well, this guy on HN converted to X from Y and saw <insert generic gains claims here>, so why are we on Y again?", which the somewhat hand-wavy details in your original comment can end up contributing to (obviously we're limited for space and attention here, so leaving out some details can be desirable). What I failed at was communicating that my comments were not intended as an attack on your specific methodologies or choices, but was more meant to make the reader of our comments consider the wider implications of blindly following the herd and not making informed decisions. I have had people forward me lists of links to isolated, comment-less HN comments as "support" for their position.

But I very clearly remember seeing all the Apache child procs bloating to 25 Mb after the first hit to the PHP code was done. So I am actually saving by externalizing on the resources.

Yes, sorry, I didn't consider the exact traffic ratios between the (proxied) Java requests and the (internally handled) PHP requests. If you've got a wide spread there favoring proxied requests, then, as you've experienced, it would be advantageous to get rid of the internal handling, proxy all requests, and outsource the bloating to other processes/systems where it is more isolated, and the upper bound on the bloat be more influenced by the lower total requests for the resources that consume more. And once that's done (the getting rid of the monolithic parts) then it's a lot easier to experiment with replacing the different parts to see if there are other gains. You may have seen similar resource consumption benefits by nginx proxying to Apache+mod_php or even to bare PHP cgi.

But one shouldn't even follow that method blindly either, because it's all based on workload, and everyone's workload is different.

There are so system management and monitoring benefits and drawbacks that go with these kinds of changes. We both know that there is no software selection silver bullet, but it's not necessarily the readers of these comments that know that.

Re:Nginx Is Taking Over the Internet by oakaz on Friday September 06, 2013 @08:50PM (#6343479)
Let's consider boxcars also: http://github.com/azer/boxcars
Re:Nginx Is Taking Over the Internet by gnaritas on Friday September 06, 2013 @11:21AM (#6340861)
People have been and still do exactly the same thing with Apache, this isn't unique to Nginx in any way.
Re:Nginx Is Taking Over the Internet by eksith on Friday September 06, 2013 @11:41AM (#6340961)
Except the configuration is far simpler with Nginx. What's more, you can even couple this with upstream weighted loadbalancing or round-robin which is terribly awkward without modules on Apache.

Edit: Not to mention sticky sessions per proxy which simplifies user management.

Re:Nginx Is Taking Over the Internet by gnaritas on Friday September 06, 2013 @11:48AM (#6341009)
Simpler, yes, that doesn't make Apache complicated. They're all simple. To say without modules makes no sense, modules are how Apache does features and the mod balance module makes all of that simple including sticky sessions. If you can write code, you can configure Apache easily.
Re:Nginx Is Taking Over the Internet by eksith on Friday September 06, 2013 @12:06PM (#6341108)
"Simpler, yes, that doesn't make Apache complicated. They're all simple."

Didn't you just contradict yourself? How can it be simpler and all be simple? Simpler implies one is greater in simplicity so which is it?

FWIW, we were running Apache 1.3 with patches on OpenBSD. For us, using the 2.x branch wasn't possible without staying atop the modules for code issues/vulnerabilities. Considering other client expectations, we didn't have the resources to audit everything like that. The fact that OpenBSD 5.2 included Nginx by default was a nice plus for us too, but we started the move before then.

Re:Nginx Is Taking Over the Internet by gnaritas on Friday September 06, 2013 @12:27PM (#6341241)
> Didn't you just contradict yourself?

No, I did not.

> How can it be simpler and all be simple? Simpler implies one is greater in simplicity so which is it?

Is English not your first language? I can choose 5 simple things, and then compare them to each other and say one is simpler. They're all still simple.

> FWIW, we were running Apache 1.3 with patches on OpenBSD. For us, using the 2.x branch wasn't possible without staying atop the modules for code issues/vulnerabilities.

Sounds like your OS was the real culprit for not keeping up with newer releases. Again, if Nginx works for you, great, you can promote that without putting down Apache which is quite simple and rock solid stable as well.

Re:Nginx Is Taking Over the Internet by spoiler on Friday September 06, 2013 @11:44PM (#6343874)
'm not a native English speaker, but I might as well be because of my proficiency. The way you formulated those two sentences was a bit off putting for me, too.

There was no need to be rude.

Re:Nginx Is Taking Over the Internet by eksith on Friday September 06, 2013 @12:59PM (#6341391)
Insulting me is a pretty poor way of being persuasive. And English is my first language, thank you.

As someone who's apparently more fluent than I am in English, you should have noted that I'm not "putting down" Apache as much as showing that, out of the box, Nginx still is a better option than Apache. This isn't my opinion as much as it is empirically observed fact both in our environment as well as our clients' environments.

Re:Nginx Is Taking Over the Internet by gnaritas on Friday September 06, 2013 @01:23PM (#6341528)
> Insulting me is a pretty poor way of being persuasive.

I didn't insult you, it was an honest question as I can't assume everyone here is a native English speaker and your confusion could have easily been a language thing.

> And English is my first language, thank you.

OK, great, then I don't know what was at all confusing about what I said.

> Apache as much as showing that, out of the box, Nginx still is a better option than Apache.

Such blanket statements are simply unsupportable. It depends entirely on the workload, needs, language, and configuration. Out of the box, Apache isn't configured for the process model that everyone complains makes it a pig.

Re:Nginx Is Taking Over the Internet by jafaku on Friday September 06, 2013 @01:46PM (#6341660)
You have been downvoted, lol.

This is the stupid HN system at work: Someone who doesn't understand English being a native speaker (simple vs simpler) can downvote you because he has "earned" that right, by submitting a gazillion articles with 1 point each.

Re:Nginx Is Taking Over the Internet by eksith on Friday September 06, 2013 @02:19PM (#6341830)
I didn't downvote anyone on this thread. In fact, you can't downvote anyone who has replied to you or anyone you're replying to you. Article submissions are for everyone to read whether they're voted for or not. I frequently browse /newest because I see articles that never make the front page, that I enjoy regardless and I want to share what I find interesting.

While you're here, you may want to take a browse on the guidelines http://ycombinator.com/newsguidelines.html

Re:Nginx Is Taking Over the Internet by asdasf on Friday September 06, 2013 @01:29PM (#6341560)
>Sounds like your OS was the real culprit for not keeping up with newer releases.

Newer releases are quite bad from both a security and a stability standpoint. They did not make configuration simpler, so the idea that using the last reasonable release of apache was the problem doesn't make any sense.

Re:Nginx Is Taking Over the Internet by leephillips on Friday September 06, 2013 @12:24PM (#6341222)
Where's the contradiction? He says that Nginix is simpler than Apache, which is also simple.

"which is it?"

He just said which one it was. I don't see how anyone could fail to understand this.

Re:Nginx Is Taking Over the Internet by chc on Friday September 06, 2013 @04:47PM (#6342585)
> How can it be simpler and all be simple? Simpler implies one is greater in simplicity so which is it?

Two feet is not very far to walk. Three feet is farther, but it is still not a great distance to walk. Two things can both be short/simple even if one is a bit shorter/simpler.

Re:Nginx Is Taking Over the Internet by na85 on Saturday September 07, 2013 @03:47AM (#6344284)
There's no contradiction in his/her statement. You are just being obtuse
Re:Nginx Is Taking Over the Internet by oakaz on Friday September 06, 2013 @08:59PM (#6343508)
Either Nginx and Apache is pain in the ass to configure. No need to mention both have some unix challenges that you gotta solve for just starting to serve bunch of stupid shit. Have a look at boxcars
Re:Nginx Is Taking Over the Internet by mintplant on Friday September 06, 2013 @01:24PM (#6341530)
I installed Apache recently along with ownCloud on my Raspberry Pi. I had to strip it back out when I realized that Apache worker processes were keeping the CPU and RAM at 100% the entire time, when nothing was even connected to it.

I used to use Apache all the time way back when. The memories that stick with me are of a massive tangle of configuration rules, mod_*, and htaccess files. I've never looked back since going the way of Nginx. It's just so lightweight in comparison, both performance- and maintenance-wise.

Re:Nginx Is Taking Over the Internet by perbu on Friday September 06, 2013 @02:49PM (#6341995)
That a bug. Probably an architecture dependant one or some package maintainer who messed up. Your experience with Apache httpd on your little homebrew computer gadget doesn't say anything about Apache httpd and how it is usually deployed.

Apache httpd is still bloody awesome.

Re:Nginx Is Taking Over the Internet by mintplant on Friday September 06, 2013 @04:16PM (#6342422)
As stated in the same comment, my "little homebrew computer gadget" wasn't the only platform I've run Apache httpd on. It was just yet another environment in which it came out as sub-optimal when compared with Nginx in the same use case.
Re:Nginx Is Taking Over the Internet by LekkoscPiwa on Friday September 06, 2013 @03:18PM (#6342127)
Let me explain you what buggy means. Buggy means heavy, overweight, with thousands of configuration lines just to end up with something slow and crashing.
Re:Nginx Is Taking Over the Internet by sliverstorm on Friday September 06, 2013 @02:51PM (#6342009)
I don't think it's fair to use the rPi as your case-study. You would be hard-pressed to find a complete modern computer that is more different from the typical machine that runs httpd in a commercial environment.
Re:Nginx Is Taking Over the Internet by mintplant on Friday September 06, 2013 @04:14PM (#6342414)
As I said, the Raspberry Pi isn't the only platform I've run Apache httpd on, and that experience isn't the primary motivating factor behind my dislike for the software.

It just struck me how starkly the difference in resource consumption between it and Nginx was illustrated in that case in particular, as the rPi handles the latter just fine.

Re:Nginx Is Taking Over the Internet by yogo on Friday September 06, 2013 @05:31PM (#6342803)
Sounds like something isn't right. You might have a setup where everything is enabled (at least from a high memory consumption point of view). You can get the Apache child processes down to ~2MiB (still a bit high by lighttpd and nginx standards) by disabling a lot of the modules. How many child processes started by default? Check your mpm settings, as you could be using the configuration for a beefy server environment.
Re:Nginx Is Taking Over the Internet by jh3 on Friday September 06, 2013 @11:34AM (#6340922)
He did start his comment with "For my style of coding". Maybe it's just simpler to configure these rules in Nginx than it is in Apache for lkrubner.
Re:Nginx Is Taking Over the Internet by gnaritas on Friday September 06, 2013 @11:40AM (#6340956)
The problem is that he says Nginx enabled fast reverse proxy and that's just not true, nothing he described was enabled by Nginx, that was how people already did things in Apache. Apache is not hard to configure, it would support his style of coding just fine and very likely work just as well as Nginx for him.

The problem people have with Apache usually isn't really apache, it's with PHP forcing them to use the process based mpm which makes it a pig. This is PHP's fault, not Apache's. use the threaded or evened worker mpm's and it's not a pig at all.

Re:Nginx Is Taking Over the Internet by hardwaresofton on Friday September 06, 2013 @11:42AM (#6340969)
Yes. It is remarkably simple to set up reverse proxies in nginx.

It is also remarkably easy to set up SSL (minus generating certificates) -- it's only 3 lines.

Re:Nginx Is Taking Over the Internet by gnaritas on Friday September 06, 2013 @01:26PM (#6341543)
It's just as easy in Apache.
Re:Nginx Is Taking Over the Internet by Helianthus on Friday September 06, 2013 @02:00PM (#6341721)
...No it isn't. It might be 'simple' for you, and it might be readily configurable once you know how to do it, but that doesn't make it easy.

I really can't tell if you're being deliberately obtuse about this. Don't you see all the people going "Yeah, it was faster to do this with nginx than it was with Apache"?

Are you the sort of person that's surprised PHP got so popular?

Re:Nginx Is Taking Over the Internet by troels on Friday September 06, 2013 @02:19PM (#6341832)
Oh, come on. It's pretty simple. You google a bit around for it and find some 3 year old blog post that tells you what to do. You'd probably have to do the same for nginx anyway.

I prefer nginx' configuration syntax over apache's though.

Re:Nginx Is Taking Over the Internet by hardwaresofton on Friday September 06, 2013 @09:21PM (#6343561)
I'd like to point out that my first point was specifically towards reverse proxying...

This page should be all the proof I need: http://www.apachetutor.org/admin/reverseproxies

where as reverse proxies in nginx: http://www.cyberciti.biz/tips/using-nginx-as-reverse-proxy.h...

So maybe you could make a case for nginx being less modular (or obviously so) -- but 1 config files with the right magic spell beats downloading x module and setting up x directory PLUS the magic file.

Also, I think that in general, nginx fits more into the many-apps-different-implementations-same-server vision of the modern day web app.

Re:Nginx Is Taking Over the Internet by troels on Saturday September 07, 2013 @05:20AM (#6344513)
That would be pretty bad proof though. If you ignore the chit-chat, which is just the authors writing style, and the ugly colour scheme, the essential part is here: http://www.apachetutor.org/admin/reverseproxies#d13

That's 26 lines of configuration, compared to the nginx example, which is 54 lines. Both are kind of arcane looking, if you haven't used it before.

Re:Nginx Is Taking Over the Internet by hardwaresofton on Saturday September 07, 2013 @10:52AM (#6345226)
oh but what about installing the modules/files that are getting loaded?

True, they're not night and day, but it's still stuff to do. Also, the page I sent, the actual reverse proxy is only 14 lines, half of it is extra stuff... The section where it says "start with example.com".

And that's the whole server, whereas the

Re:Nginx Is Taking Over the Internet by Helianthus on Friday September 06, 2013 @02:26PM (#6341873)
... hahaha exactly.

I didn't say it wasn't simple. But simple is just sufficiently managed complexity.

Re:Nginx Is Taking Over the Internet by gnaritas on Friday September 06, 2013 @02:48PM (#6341992)
> Don't you see all the people going "Yeah, it was faster to do this with nginx than it was with Apache"?

Configuring Apache is easy as there are tens of thousands of tutorials showing you exactly how to add those two little lines of code to enable proxy and/or a cert. Both Apache and Nginx are easy to configure, Nginx is easier, that doesn't make Apache hard.

> Are you the sort of person that's surprised PHP got so popular?

Nope, I've worked with tons of PHP developers and I know exactly why it's popular. Wide support, easy copy to server deployment, and in large part, dumber programmers who want you to give them the codes because it's a copy and paste community in large part. All languages have a wide variety of users, but I've found the worst of the worst go to PHP like a month to a flame exactly because it's so simple to get started and despite how terrible a language it is.

Re:Nginx Is Taking Over the Internet by hardwaresofton on Friday September 06, 2013 @09:24PM (#6343568)
I think of PHP as a templating language, to be honest. I like it (I still think the LAMP stack is cool), but the kind of code that it forces you to produce is often focused around document generation (as was the majority of the internet for a long time).

Maybe it's just the wrong tool for this time, and it used to be right tool in the past.

Re:Nginx Is Taking Over the Internet by nawitus on Friday September 06, 2013 @12:12PM (#6341142)
It is definately simpler to configure Nginx to reverse proxy, Apache needs a few more lines of configuration.
Re:Nginx Is Taking Over the Internet by jebblue on Friday September 06, 2013 @12:57PM (#6341378)
From http://httpd.apache.org/docs/2.2/mod/mod_proxy.html:

ProxyPass /foo http://foo.example.com/bar ProxyPassReverse /foo http://foo.example.com/bar

I've used it for years, it's not hard.

Re:Nginx Is Taking Over the Internet by nawitus on Friday September 06, 2013 @01:16PM (#6341487)
I was talking about installing Apache and setting it up as a reverse proxy vs. installing Nginx and setting it up as a reverse proxy. Nginx takes less configuration in that scenario. I've done both and neither are hard, but nginx is slightly easier.
Re:Nginx Is Taking Over the Internet by gnaritas on Friday September 06, 2013 @02:58PM (#6342046)
Installing Apache is a single command, enabling mod proxy is a single command and two lines of config. So yes, they are both trivially simple to do, even if Nginx is slightly simpler. Neither should be seen as a barrier of complexity.
Re:Nginx Is Taking Over the Internet by MatthewPhillips on Friday September 06, 2013 @01:04PM (#6341418)
For the simple case Apache is only 2 lines. Nginx requires more, because Apache automatically sets the proxy headers and Nginx does not.
Re:Nginx Is Taking Over the Internet by insertnickname on Saturday September 07, 2013 @02:51AM (#6344187)
Re:Nginx Is Taking Over the Internet by cmbaus on Friday September 06, 2013 @12:17PM (#6341177)
This is the reason we use nginx. It can hide the details of our multiple platform architecture.

All the discussion around Nginx recently, has me wondering if I should revisit my own proxy project: http://switchflow.org/

Re:Nginx Is Taking Over the Internet by acdha on Friday September 06, 2013 @12:02PM (#6341086)
I've been using Varnish for this: it's even simpler and has the advantage of having a non-broken HTTP cache module so you can use content negotiation and caching at the same time.
Re:Nginx Is Taking Over the Internet by Florin_Andrei on Friday September 06, 2013 @02:05PM (#6341752)
Great summary.