background preloader

Web Stacks

Facebook Twitter

Webtask. Varnish Community. Why You Should Never Use MongoDB « Sarah Mei. Disclaimer: I do not build database engines.

Why You Should Never Use MongoDB « Sarah Mei

I build web applications. I run 4-6 different projects every year, so I build a lot of web applications. I see apps with different requirements and different data storage needs. I’ve deployed most of the data stores you’ve heard about, and a few that you probably haven’t. I’ve picked the wrong one a few times. The project Diaspora is a distributed social network with a long history. But they hit a nerve. Diaspora was the first Kickstarter project to vastly overrun its goal. As a result of their Kickstarter success, the guys left school and came out to San Francisco to start writing code. They ended up staying at Pivotal for more than two years.

That’s a lot of buzzwords. “Distributed social network” If you’ve seen the Social Network, you know everything you need to know about Facebook. A screenshot of the Diaspora user interface The Diaspora infrastructure is not located behind a single web address. Beginner’s Guide. This guide gives a basic introduction to nginx and describes some simple tasks that can be done with it.

Beginner’s Guide

It is supposed that nginx is already installed on the reader’s machine. If it is not, see the Installing nginx page. This guide describes how to start and stop nginx, and reload its configuration, explains the structure of the configuration file and describes how to set up nginx to serve out static content, how to configure nginx as a proxy server, and how to connect it with a FastCGI application. nginx has one master process and several worker processes.

The main purpose of the master process is to read and evaluate configuration, and maintain worker processes. The way nginx and its modules work is determined in the configuration file. Starting, Stopping, and Reloading Configuration To start nginx, run the executable file. Nginx -s signal Where signal may be one of the following: nginx -s quit This command should be executed under the same user that started nginx. MediaWiki. 3. Install nginx, PHP5-FPM and APC cache. Installing nginx, PHP5-FPM and APC cache If you are used to apache it is time for a change.

3. Install nginx, PHP5-FPM and APC cache

Give nginx along with php5-fpm a try, in conjunction with the APC cache you will get a massive performance gain compared to common "oldschool" php setups. # aptitude install nginx php5-fpm php-apc You can also install mysql at this point, since mysql and mongodb use different ports by default this is no problem. The file /etc/php5/fpm/pool.d/www.conf must contain the following line: listen = localhost:9000 Currently this line is not set automatically in debian wheezy, so check if this line exists. Nginx/FastCGI. Ryan Mitchell : Have PHP-FPM Listen On Unix Socket. Web served, part 3: Bolting on PHP with PHP-FPM. Splashing in the pool One of the greatest strengths of PHP-FPM is its ability to scale its worker processes up and down as load on the server increases.

Web served, part 3: Bolting on PHP with PHP-FPM

PHP-FPM can have several "pools" of PHP handlers: one for each different Web application, with different numbers of worker processes and different rules about when to add more processes or kill idle processes. Our needs are simple—we only need a single pool, defined in the www.conf file, and we can accept the default values for the number of PHP processes running and how and when processes are added or removed.

However, if you want to change them, here are the settings in www.conf to modify: pm = dynamic: Changes how PHP-FPM wil spin up PHP workers. Again, the default values of these settings are fine for a small site. Configuring memcached The last thing we need to do before we can bring our PHP configuration to life is ready memcached to accept connections on a Unix socket. Debian 7 Wheezy Dedicated Web Server Setup Step by Step. Debian 7.0 Wheezy has been officially released on May 5, 2013.

Debian 7 Wheezy Dedicated Web Server Setup Step by Step

MediaWiki on Nginx - Bigdinosaur Blog. I host a small Minecraft server with maybe a couple dozen players total, and for the past several months we’ve been using a wiki to catalog our achievements.

MediaWiki on Nginx - Bigdinosaur Blog

I started with DokuWiki, a flat-file wiki, because I was reluctant to weigh down a webserver with a database just to host a small wiki, but now that Bigdinosaur.org is hosting some more things and needs a database, it seemed time to switch over to MediaWiki, the wiki engine that powers Wikipedia and the whole MedkaWiki foundation network of sites. There are lots of MediaWiki-on-Nginx guides out there, but I didn’t find anything approaching the completeness of the much more common MediaWiki-on-Apache guides.

The configuration I settled on was a mix of things from around the web, including the MediaWiki site and the Nginx Wiki, and my own ideas, with an eye toward closing off access to as much of the internals as possible and pulling the main configuration components out of the web root. Prerequisites.