Cogini Blog

Jake Morrison

Port forwarding with iptables

In order to listen on a TCP port less than 1024, an app traditionally needs to be started as root. Over the years this has resulted in many security problems. A better solution is to run the application on a normal port such as 4000, and redirect traffic in the … Read more…

Jake Morrison

Rate limiting Nginx requests

Any popular service may be the unfortunate recipient of a DDOS attack. We find that DDOS load ends up driving capacity planning, as it can easily be 10x the normal load. You can rate limit at multiple levels. You might use a service such as CloudFlare, filtering provided by your … Read more…

Jake Morrison

Serving your Phoenix app with Nginx

It's common to run web apps behind a proxy such as Nginx or HAProxy. Nginx listens on port 80, then forwards traffic to the app on another port, e.g. 4000. Following is an example nginx.conf config: user nginx; worker_processes auto; error_log /var/log/nginx/error.log … Read more…

Jake Morrison

Serving Phoenix static assets from a CDN

Phoenix is fast, but you can improve performance by serving requests for static files like images, CSS and JS from Nginx or a content delivery network (CDN). This allows your app to focus on dynamic content. Serving static assets from Nginx If you are running your app behind Nginx, configure … Read more…

Jake Morrison

Advantages of Elixir vs Golang

A prospect recently asked me what the advantages are of Elixir over Golang. The simple answer is productivity. You get the best of both worlds: the productivity of a high level language with the scaling power of the mature Erlang platform. Go is a low level language, and performance is … Read more…

Jake Morrison

Yield optimization vs customer service

Whenever we try to squeeze the last bit of utilization out of a system, there is a danger that it will have a big negative impact on the user experience. A great example of this is overbooking in the airline industry. Usually a bad customer experience does not involve getting … Read more…

Jake Morrison

Incrementally migrating large Rails apps to Phoenix

Here are the slides for the presentation on incrementally migrating large Rails apps to Phoenix I gave at Ruby Elixir Conf Taiwan 2018. Read more…

Jake Morrison

Is Elixir/Phoenix ready for production?

How I evaluated Elixir in 2014 when we were deciding whether it was mature enough Read more…

Jake Morrison

Setting Ansible variables based on the environment

When deploying applications, we we usually have the same basic architecture in different environments (dev, test, prod), but settings differ. Some settings are common to all the machines in the environment, e.g. the db server connection string. We need to vary the size of instances depending on the environment … Read more…

Jake Morrison

What makes a language popular?

In the recent HackerRank developer survey, we can see "Which languages do employers look for by industry?" and "Which languages are developers planning to learn next?" In terms of popularity, there is a definite swing to JavaScript and Python. In terms of mind share with language enthusiasts, not so much … Read more…

Categories

Development DevOps Products

Tags