Chris Elleman Technical Stuff

25 Aug/12 Off

S3 Site integrated with Home Raspberry Pi

Building on the success of this website and it being served out of Amazon S3, I have decided to re-jig my home server setup. My old server was a small PC which sat in a cupboard and did things like media serving (off a USB HD), DNS, DHCP, SSH server, etc and in total it drew around 25W to power it, which generated some heat when it was sat in a cupboard - not very good now that the weather has been a bit hotter.

I have replaced that server with a raspberry pi (drawing around 0.5W) to deal with the always on tasks as described above, the raspberry pi is capable enough, but if I want to download something really quick I just can't get the transfer rate out of the raspberry pi; so, I have kept the original server and used wake-on-lan to power it up only when needed to do some heavy lifting.

This means that the raspberry pi is acting more like an orchestration server, so if I want to build any apps for home, then it would be good to seperate the presentation from any computation, for example, I have an app to track my media and do some transcoding, I'd like this not to be served directly from home if possible and I'd like to leverage facebook oauth, so I've put together the solution below which makes use of S3 to serve static assets and my home raspberry pi as an API endpoint.

This design has several advantages:

  • de-coupled presentation from computation - allows for future scaling etc
  • leverage external identity provider - takes the pain away
  • cname home broadband dynamic DNS under application domain to give access to cookies etc - unified secutiy model
  • energy/cost saving moving from traditional server to raspberry pi
  • bandwidth costs are much lower - high volumes of data are served by my home broadband and not from S3