DEFRA / ruby-services-team

Guides, info and issue management for the Ruby Services team
Other
1 stars 3 forks source link

Clear old assets from web servers #33

Open Cruikshanks opened 5 years ago

Cruikshanks commented 5 years ago

The setup in WEX and WCR is that we have a frontend server hosting nginx separate from the backend server hosting rails.

We use nginx to host all our static assets but because it's not on the same server as rails, as part of the deployment we transfer the compiled assets to the web server.

Every time we compile assets they get a unique filename, so every time we transfer them we're just dumping a new set of files on the web server.

There is a risk this might impact performance, as Nginx has to hunt through more and more files to find the one to serve. Plus we know in our non-production environments after so many release we simply run out of space on the servers.

Because of this there is a risk that one day our production environment will fail during a deployment because we're not able to transfer the latest compiled assets.

Cruikshanks commented 5 years ago

Have sent details about this to our PM to get it added to the backlog.