<commit_before>{
    "title": "Moving from Nginx to aerys - an experiment",
    "metaTitle": "Building PHP microservices using Angela worker framework",
    "description": "An article about my experiences trying to use the aerys application server instead of nginx for my geolocation API at geoip.nekudo.com.",
    "date": "2017-01-15",
    "slug": "moving-shinygeoip-from-nginx-to-aerys",
    "author": "Simon",
    "categories": "WebDev,News"
}

::METAEND::

In this short article I want to share my experiences with the aerys application framework. I experimentally used the
aerys server at my ShinyGeoip instance over at geoip.nekudo.com.
<!--more-->

## Introduction

The free geolocation API at [geoip.nekudo.com](http://geoip.nekudo.com) currently runs on two servers. Traffic and load
is distributed using simple round-robin DNS. Each server handles between 100 and 150 request per second which you can
see in the two graphs below.

<img src="/images/blog/nginx_requests_server1_2017-01.png" alt="ShinyGeoip Nginx req/s on server 1" title="ShinyGeoip Nginx req/s on server 1" class="centered" />
<br>
<img src="/images/blog/nginx_requests_server2_2017-01.png" alt="ShinyGeoip Nginx req/s on server 2" title="ShinyGeoip Nginx req/s on server 2" class="centered" />

As this API is totally free of charge I of course try to reduce load on the severs as much as possible to keep the
costs low. Because the nginx and php-fpm configuration as well as the PHP code is more or less optimized as much as<commit_msg>Fix meta title<commit_after>{
    "title": "Moving from Nginx to aerys - an experiment",
    "metaTitle": "Replacing nginx with aerys at ShinyGeoip - an experiment",
    "description": "An article about my experiences trying to use the aerys application server instead of nginx for my geolocation API at geoip.nekudo.com.",
    "date": "2017-01-15",
    "slug": "moving-shinygeoip-from-nginx-to-aerys",
    "author": "Simon",
    "categories": "WebDev,News"
}

::METAEND::

In this short article I want to share my experiences with the aerys application framework. I experimentally used the
aerys server at my ShinyGeoip instance over at geoip.nekudo.com.
<!--more-->

## Introduction

The free geolocation API at [geoip.nekudo.com](http://geoip.nekudo.com) currently runs on two servers. Traffic and load
is distributed using simple round-robin DNS. Each server handles between 100 and 150 request per second which you can
see in the two graphs below.

<img src="/images/blog/nginx_requests_server1_2017-01.png" alt="ShinyGeoip Nginx req/s on server 1" title="ShinyGeoip Nginx req/s on server 1" class="centered" />
<br>
<img src="/images/blog/nginx_requests_server2_2017-01.png" alt="ShinyGeoip Nginx req/s on server 2" title="ShinyGeoip Nginx req/s on server 2" class="centered" />

As this API is totally free of charge I of course try to reduce load on the severs as much as possible to keep the
costs low. Because the nginx and php-fpm configuration as well as the PHP code is more or less optimized as much as
{'fraction_non_alphanumeric': 0.09138898053447707, 'fraction_numerical': 0.02111514351699109, 'mean_word_length': 4.3568904593639575, 'pattern_counts': {'":': 14, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5933694', 'n_tokens_mistral': 994, 'n_tokens_neox': 908, 'n_words': 392}