When your app is running behind a proxy like Nginx, then the request will look
like it's coming from Nginx, i.e. the IP will be
127.0.0.1. Similarly, If
Nginx is behind a CDN, then all the requests will come from the IP of the CDN.
Normally, in order to listen on a port less than 1024, an app needs to be running as root or have elevated capabilities. That's a security problem waiting to happen, though. We run the app on a normal port, e.g. 4000, and redirect traffic in the firewall from port …
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 …
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
user nginx; worker_processes auto; error_log /var/log/nginx/error.log warn; pid …
When running your app in production, you can improve performance by serving static assets such as images, CSS and JS from a content delivery network (CDN). The CDN caches your content in servers close to your customers, improving network latency.
Phoenix is fast, but the more requests handled by the …
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 …
We have been working on a project migrating a big Rails app from physical hardware to AWS, and I have been doing a lot of automation work.
It strikes me how we are doing the same thing over and over with different tools: reading variables, templating files and running semi-declarative …
After a fair amount of debugging, I got an app running in an AWS Auto Scaling Group (ASG), pulling its config on startup from S3 and code from Amazon CodeDeploy. On the way I found out some annoying parts of the cloud initialization process in AWS.
The idea is that …
- db migrations
- functional programming
- graphical design
- know your customer
- rate limiting
- static assets
- user experience
- user stories