TextDB Is a Simple Way to Share Small Amounts of Data

Copied URL with current time.
0:00 / 0:00

In this episode of Running in Production, Ian Davidson goes over building a data sharing service using Phoenix and Elixir. It’s using Live View too. At its peak the site received a spike of 10k+ requests in a day and it’s hosted on a $20 / month DigitalOcean server.

Ian talks about quickly building the app, reacting quickly to add user requested features, using DigitalOcean for the first time, some pitfalls of using Live View / websockets when it comes to configuring nginx and more.

Topics Include

  • 1:35 – Motivation for using Phoenix, Elixir and Live View
  • 4:14 – How the site works, it saves data to a combination of PostgreSQL and the file system
  • 5:48 – The experience of developing the app with Phoenix Live View
  • 8:42 – Adding features quickly based on user feedback
  • 11:13 – It’s an open source monolithic code base sitting in 1 git repo on GitHub
  • 14:43 – nginx is sitting in front of the cowboy server and terminals SSL
  • 16:57 – It’s hosted on DigitalOcean for $20 / month (2 vCPUs and 4 GB of RAM)
  • 18:56 – The OS is Ubuntu 20.04 LTS and DigitalOcean’s automated backups are on
  • 20:17 – The server was set up and configured manually without using Elixir releases too
  • 22:36 – The deployment process from development to production
  • 26:41 – The BEAM takes about 5 seconds to restart which is a bit of down time
  • 28:50 – DigitalOcean’s Cloud Firewall is being used along with their monitoring tools
  • 32:00 – nginx is taking care of basic rate limiting by IP address
  • 34:20 – Best tips? Phoenix is a great choice for side projects but beware of websockets
  • 36:11 – Not having end to end tests before launching was kind of a mistake
  • 37:34 – Check out the site at https://textdb.dev/
📄 References
⚙️ Tech Stack
🛠 Libraries Used

Support the Show

This episode does not have a sponsor and this podcast is a labor of love. If you want to support the show, the best way to do it is to purchase one of my courses or suggest one to a friend.

  • Dive into Docker is a video course that takes you from not knowing what Docker is to being able to confidently use Docker and Docker Compose for your own apps. Long gone are the days of "but it works on my machine!". A bunch of follow along labs are included.
  • Build a SAAS App with Flask is a video course where we build a real world SAAS app that accepts payments, has a custom admin, includes high test coverage and goes over how to implement and apply 50+ common web app features. There's over 20+ hours of video.


  • Want to discuss this episode on Twitter? Tag @nickjanetakis or use #RunningInProduction

Feb 01, 2021

✏️ Edit on GitHub