Running in Production
Running in Production
Nick Janetakis - Full stack developer
Changelog.com Is a News and Podcast Platform for Developers
1 hour 33 minutes Posted Dec 28, 2020 at 5:00 am.
– Motivation for choosing Phoenix and Elixir
– The MVP didn’t require too many changes to make it deployable
– It’s an open source monolithic app in 1 git repo and it doesn’t use contexts
– Gerhard was happy to see it was a monolithic app when it came to deploying it
– A few useful libraries that help power the podcast CMS
– Using embedded schemas for handling email subscription settings
– Using Docker but Jerod hasn’t gone all-in with it in development
– It’s mostly server side templates with sprinkles of JavaScript and Turbolinks
– Choosing not to use Live View because Turbolinks is working at the moment
– nginx, Linode’s load balancer, Fastly as a CDN and handling metrics
– Motivation for choosing Linode and using their Kubernetes Engine
– Serving about 200 requests per minute and how caching is done with ETS
– Creating very thin wrapper modules for certain libraries when it makes sense
– The deployment process from development to production
– What was it like to transition to using Kubernetes?
– Polling for new versions of the app instead of giving CI the keys to the kingdom
– Dealing with inserting secrets into the app through Kubernetes
– The embodiment of dev and ops working very well together
– Database backups, making small changes and health checks
– Best tips (Jerod)? Team up with people who fill in your knowledge gaps
– Best tips (Gerhard)? Be honest about what you like and enjoy doing
– Gerhard has a personal site, Jerod is on Twitter & check out https://changelog.com/
0:00
1:33:08
Download MP3
Show notes
In this episode of Running in Production, Jerod Santo and Gerhard Lazu go over their news and podcast platform which is using Phoenix and Elixir.
It was rewritten in Phoenix back in 2015 and it runs on Linode’s Kubernetes
Engine across a 3 node cluster.
Jerod and Gerhard talk about building a context-less Phoenix app, using
Turbolinks, caching, transitioning to using Kubernetes, automating as much as
possible while focusing on patterns that work for small teams and so much more.
Topics Include
13:43 – It’s an open source monolithic app in 1 git repo and it doesn’t use contexts
1:31:57 – Gerhard has a personal site, Jerod is on Twitter & check out https://changelog.com/
Links
📄 References
https://twitter.com/adamstac
https://github.com/edeliver/edeliver
https://www.youtube.com/watch?v=0hd0FPd47II (3h+ podcast on Changelog’s history)
https://github.com/thechangelog/changelog.com/blob/master/mix.exs
https://skaffold.dev/
https://changelog.com/posts/why-we-chose-turbolinks
https://changelog.com/posts/the-new-changelog-setup-for-2020
https://www.lastpass.com/
https://www.youtube.com/watch?v=sTt-jdDEWAw (epic Predator handshake scene)
https://github.com/derailed/k9s
https://github.com/thechangelog/changelog.com
⚙️ Tech Stack
phoenix →
elixir →
circle-ci →
docker →
fastly →
grafana →
kubernetes →
lets-encrypt →
linode →
nginx →
pingdom →
postgres →
prometheus →
s3 →
turbolinks →
webpack →
🛠 Libraries Used
https://github.com/quantum-elixir/quantum-core
https://github.com/stavro/arc
https://github.com/thoughtbot/bamboo
https://github.com/thoughtbot/ex_machina
https://github.com/asaaki/cmark.ex
https://github.com/drewolson/scrivener
https://github.com/sasa1977/con_cache
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.