Running in Production

Nick Janetakis - Full stack developer
undefined
Aug 23, 2021 • 50min

School Bus Hero Helps School Bus Drivers and Aides Find a Job

In this episode of Running in Production, Dieter Lunn goes over building a job board site for school bus drivers and aides using Ruby on Rails. It’s hosted on DigitalOcean with HatchBox. Dieter talks about using a bit of StimulusJS to add pins to a map, keeping things simple with a monolithic app, working on the code base with another developer, upgrading to the latest versions on a regular basis and using HatchBox to manage the servers. Topics Include 3:13 – What the site does and examples of what types of pages it has 5:21 – Motivation for using Ruby on Rails 7:02 – Specific features of Rails and gems being used 11:04 – Using StimulusJS for placing pins on an embedded 2D map 14:02 – One feature lets you get emailed when new positions open at a company 15:40 – It’s a server rendered monolithic Rails app with sprinkles of JS 19:14 – Keeping your gems up to date 23:15 – Using Pundit to manage authorization 25:27 – Keeping up with the latest versions and having an app starter project 27:09 – It’s hosted with HatchBox on DigitalOcean 32:02 – Walking us through developing a feature and deploying it to production 38:07 – Payments are handled outside of the Rails app 39:39 – Automation feels pretty good! 43:45 – Currently Honeybadger sends notifications if the site is down 45:47 – Best tips? Take your time and trust what others have built 48:08 – You can find Dieter on GitHub and on Twitter Links 📄 References https://gorails.com https://runninginproduction.com/podcast/12-learn-ruby-on-rails-through-screencast-tutorials-on-gorails https://github.com/coder2000/campestral (Rails template starter project) https://www.hatchbox.io/ ⚙️ Tech Stack rails → ruby → digitalocean → elasticsearch → honeybadger → mapbox → postgres → stimulusjs → turbo → webpack → 🛠 Libraries Used https://github.com/ankane/searchkick https://github.com/heartcombo/devise https://github.com/alexreisner/geocoder https://github.com/thoughtbot/administrate https://github.com/varvet/pundit 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.
undefined
Aug 16, 2021 • 1h 48min

Hitobito Helps You Manage Communities with Complex Group Hierarchies

In this episode of Running in Production, Matthias Viehweger goes over building a service to help organize groups of people. It’s built with Ruby on Rails and is hosted on OpenShift with Kubernetes. It’s been running in production since 2012. Matthias talks about building a Rails Engine abstraction, creating a multi-repo monolith, using Sphinx for full text search, making the most of Kubernetes / OpenShift and lots more. Topics Include 6:23 – There’s an open source version of it along with a hosted SAAS app 9:10 – Motivation for using Ruby on Rails and updating from v4 to v6 over time 12:18 – Using Action Mailer and Delayed Job to send and receive emails 16:40 – A few other gems being used in the project 19:25 – 86 models in the core app and 275 extra for a specific Scout site (~70k LOC too) 22:49 – How billing is handled for the hosted SAAS app (it’s through invoices) 24:54 – Handling integrations by exporting data 26:31 – It’s a multi-repo monolithic application, what the “core” and “wagon” are 32:02 – There’s mostly server rendered templates with a bit of JS on the front-end 35:00 – Full text search is handled with the Thinking Sphinx gem 37:09 – There’s a separate MySQL database for each tenant 42:35 – Tech stack run down so far and how memcached is being used 44:58 – The app is set up to use Docker Compose in dev but Matthias doesn’t use it 48:05 – It’s hosted on APPUiO which is a hosted version of OpenShift 50:20 – We’re all YAML engineers, configuring Kubernetes and DB migrations 1:03:04 – Kustomize is being used instead of Helm for templating YAML files 1:05:20 – The Kubernetes related code is in its own git repo 1:08:01 – From developing a feature locally to pushing it to production 1:19:38 – Resource limits are defined in the Kubernetes config files 1:27:40 – Backing up the database with daily Kubernetes cron jobs 1:31:02 – Developers are treated like grown ups when it comes to customer data 1:34:48 – Handling logging and alerting with Prometheus, Grafana and Kubernetes 1:40:51 – Handling DNS with DNSimple and SSL certificates with Let’s Encrypt 1:44:05 – Best tips? Start with a specific thing instead of making a generic thing 1:46:45 – Check out https://hitobito.com/ and their GitHub account, Matthias is also on GitHub, Twitter and he has a site at http://kronn.de/, also Puzzle is the company he works for Links 📄 References https://github.com/basecamp/name_of_person https://tldrlegal.com/license/gnu-affero-general-public-license-v3-(agpl-3.0) https://edgeguides.rubyonrails.org/active_record_encryption.html https://runninginproduction.com/podcast/71-dnsimple-is-a-simple-and-secure-domain-management-service https://github.com/puzzle/statuscope ⚙️ Tech Stack rails → ruby → appuio → bash → cloudscale → dnsimple → docker → github-actions → grafana → jenkins → kubernetes → lets-encrypt → memcached → mysql → nginx → open-source → openshift → prometheus → redhat → sentry → uptime-robot → 🛠 Libraries Used https://github.com/basecamp/trix https://github.com/collectiveidea/delayed_job https://github.com/salsify/delayed_job_heartbeat_plugin https://github.com/joshwlewis/validates_by_schema https://github.com/rubysherpas/paranoia https://github.com/codez/wagons https://github.com/pat/thinking-sphinx https://github.com/rails-on-services/apartment https://github.com/puzzle/bleib/ https://kustomize.io/ 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.
undefined
Aug 9, 2021 • 1h 16min

Submotion Helps You Manage Access Control for Your SAAS Subscriptions

In this episode of Running in Production, Kristian Dupont goes over building a SAAS app to manage access control to your existing SAAS subscriptions. It’s built with Koa, Node and React and is hosted on Heroku. It’s been running in production since 2018. Kristian talks about validating his idea before coding it, really leveraging code linting tools, the challenges of adding a bunch of different SAAS app integrations, using ElephantSQL to host his PostgreSQL database and more. Topics Include 3:20 – Starting with an empty folder as a sole developer looking to ship an MVP 4:29 – Motivation for using Node 9:19 – Reasons for choosing Koa and Knex with a custom library Kristian wrote 14:57 – Using eslint and the overall power of going all-in with linting 17:50 – The back-end is a RESTful API with React on the front-end 21:43 – Using interesting PostgreSQL features such as triggers 23:30 – Managing the front-end assets with Parcel and using TailwindCSS 30:27 – Fighting for your abstractions and creating React components 32:29 – Adding a bunch of SAAS app integrations was challenging at times 37:57 – Using Jest to run tests but not super happy about it 42:34 – 10k+ lines of code on the front-end and back-end 46:43 – Taxes in the US are fun (not) 49:00 – Mailchimp, Freshping, Datadog and Sentry are being used for various things 52:05 – Redis isn’t being used but the database is quite optimized 55:08 – The web app servers are hosted on Heroku and PostgreSQL is on ElephantSQL 58:45 – Running a Linux VM inside of an M1 Mac for local development 1:02:45 – The deployment process from development to production 1:07:49 – The DB is backed up every hour 1:09:43 – Freshping, Datadog and Slack provide good monitoring and alerting 1:12:09 – Best tips? Using Markdown to store test fixtures 1:15:24 – You can find Kristian on Twitter and his personal site lists all of his socials Links 📄 References https://nodejs.org/en/about/releases/ https://www.milesconsultinggroup.com/blog/2021/06/01/what-to-know-about-the-taxability-of-saas-in-18-key-states/ https://blog.serverfault.com/post/stack-exchanges-architecture-in-bullet-points/ https://kristiandupont.medium.com/and-naming-things-tailwind-css-typescript-and-mammals-9eab459633d2 ⚙️ Tech Stack koa → node → react → cloudflare → datadog → docker → elephantsql → freshping → gitlab-ci → heroku → mailchimp → parcel → postgres → sendgrid → sentry → slack → tailwindcss → xeno → 🛠 Libraries Used https://github.com/venables/koa-helmet https://github.com/knex/knex https://github.com/kristiandupont/kanel https://github.com/eslint/eslint https://github.com/facebook/jest https://github.com/kristiandupont/mdconf-loader 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.
undefined
Aug 2, 2021 • 1h 15min

HorseRecords Lets You Record Everything about Your Horses

In this episode of Running in Production, Andy Ide goes over building a SAAS app for horses with Django and Python. It’s hosted on a single Linode server and has been running in production since May 2021. Andy talks about learning Django while building his app, using Django Unicorn, creating a Django monolith that’s broken up with Django apps, outsourcing setting up a server, the importance of having a good testing team and more. Andy was kind enough to give listeners of this podcast 20% off for life if you use promo code RUNNING20 when signing up, that includes signing up for free since it carries over to a paid plan. Topics Include 6:11 – About 60ish users signed up about a month after launching 8:34 – The process of learning Django while building this app 11:29 – Using the Django admin and a bunch of other useful packages 14:34 – Django Unicorn is being used for interactive bits w/o having to write a lot of JS 18:34 – It’s a Django monolithic with a bunch of Django apps 22:27 – How Django Rest Framework is being used for the reporting part of the app 28:46 – The app is mostly Django rendered templates with sprinkles of JS and Unicorn 34:00 – Stripe is handling payments, their API and docs are great 41:02 – (1) $10 / month Linode server hosts everything with 1 CPU core and 2GB of memory 45:25 – Picking the most recent version of Ubuntu and keeping deploys simple 52:05 – Using Cloudflare for DNS and using their paid plan 56:54 – Running tests locally before deploying it 59:12 – Handling backups with Django DB Backup and Linode’s backup service 1:02:12 – Using Sentry for exception reporting, viewing logs and Uptime Robot 1:08:50 – Best tips? Install Sentry and have a good testing team 1:13:37 – Check out HorseRecords on Facebook and Andy’s Django Blog Links 📄 References https://en.wikipedia.org/wiki/Stud_farm https://djangochat.com/ https://djangoandy.com/2021/05/14/integrating-django-rest-framework-and-retool/ https://djangoandy.com/2021/05/02/what-i-learned-in-the-first-2-days-of-launching-my-saas-startup/ ⚙️ Tech Stack django → python → cloudflare → jquery → linode → nginx → postgres → retool → sentry → stripe → systemd → ubuntu → uptime-robot → 🛠 Libraries Used https://github.com/pennersr/django-allauth https://github.com/select2/select2 https://www.django-rest-framework.org/ https://github.com/matthewwithanm/django-imagekit https://github.com/dmpayton/django-admin-honeypot https://github.com/django-hijack/django-hijack https://www.django-unicorn.com/ https://github.com/yourlabs/django-autocomplete-light https://github.com/benoitc/gunicorn https://github.com/pypa/pipenv https://github.com/django-dbbackup/django-dbbackup 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.
undefined
Jul 26, 2021 • 1h 12min

Politico Europe Is a Business to Business News and Data Service

In this episode of Running in Production, Karl Roos goes over building a B2B news and data platform with Rails, Node and Python. It’s hosted on AWS using Elastic Beanstalk and has been up and running since 2014. Karl talks about writing a Rails API back-end, scraping 400+ sites, executing 500k+ daily jobs, using a bunch of AWS resources, what it’s like dealing with a ~500 GB MySQL database, the importance on taking action and more. Topics Include 1:55 – What type of application we are talking about here? 4:41 – Switching from PHP to a combo of Rails and Node 8:02 – A few useful Ruby gems that were used to help build the app 9:41 – The Vue front-end is for a customer facing dashboard 14:48 – Where D3.js is being used to render charts and the data pipeline 17:43 – Scraping data from 400+ sites and dealing with edge cases 21:38 – The scraper runs on 10-16 EC2 instances through Elastic Beanstalk 26:04 – Each separate service lives in its own git repository and a bit of Serverless 31:06 – Sticking with the latest stable version of Rails and updating dependencies 33:10 – Sprinkles of Python to glue together a few AWS services and translating languages 36:11 – What it’s like using Elastic Beanstalk and executing 500k+ jobs a day 40:04 – Initial AWS credits helped sway the decision to try out AWS initially 43:47 – How CloudFormation and Terraform are being used 48:59 – All devs can push to production, code reviews, linting and the deploy process 54:21 – Dealing with database migrations and a ~400-500 GB data set 1:01:17 – Getting a local dump of the DB in development, seeding data and secrets 1:06:03 – Database backups are done with the built in RDS snapshots 1:10:19 – Best tips? Less thinking, more doing and learn from your experiments 1:11:35 – Karl is on GitHub and Twitter Links 📄 References https://aws.amazon.com/elasticbeanstalk/ https://github.com/localstack/localstack ⚙️ Tech Stack rails → ruby → node → vue → python → algolia → aws → bugsnag → cloudformation → cloudfront → docker → elasticache → memcached → mysql → rds → redis → serverless → sns → sqs → terraform → 🛠 Libraries Used https://graphql-ruby.org/ https://www.apollographql.com/ https://bulma.io/ https://d3js.org/ https://github.com/cheeriojs/cheerio https://www.serverless.com/ https://codeclimate.com/ https://github.com/typicode/husky 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.
undefined
Jul 19, 2021 • 1h 55min

Couchmate Is a Social Chat Platform for Viewers of Live TV

In this episode of Running in Production, Matt Oliver goes over building a chat platform with Akka, Scala and React Native. It’s hosted on DigitalOcean with Kubernetes and has been running in production since 2013. Matt talks about rewriting his app a few times, handling tens of thousands of nightly TV shows, going all-in with Kubernetes, using Terraform, understanding it’ll take a while to learn things along the way and more. Topics Include 4:55 – Going from PHP to Scala to Node and back to Scala for the back-end 15:09 – Tens of thousands of channels are created every night 16:39 – What exactly is Akka and the actor model 19:55 – Websockets are being used quite heavily 23:04 – A few Scala libraries that were useful for building this platform 27:31 – There’s a mobile front-end using React Native for Android and iOS 31:30 – Storing and caching TV listings with Gracenote 34:53 – Roughly ~25k lines of Scala and ~11k on the front-end in 2 repos 39:41 – Motivation for using React Native instead of using native languages 45:55 – How to deal with large show TVs with a massive audience 50:28 – The app is basically 3 screens 54:34 – Handling user uploaded gifs and link submissions 1:00:09 – What it was like building out the React Native front-end 1:05:54 – Reasons for picking DigitalOcean and using Kubernetes 1:14:44 – Most of the infrastructure is managed by Terraform 1:16:57 – What it was like to go from not using Kubernetes to going all-in with it 1:24:21 – (3) 2 GB of memory / 2 CPU core servers are running the cluster 1:26:12 – What it’s like developing a new feature and deploying it to production 1:34:28 – The database is backed up on a schedule and before schema changes 1:39:21 – Prometheus, Grafana, Kamon and Sentry are used for metrics and monitoring 1:43:41 – Pingdom is used for an external site monitor 1:44:31 – It took about a month to get confident in using Kubernetes 1:49:29 – Best tips? It’s going to take a while, hang in there 1:53:06 – Writing comments for your future self while learning 1:54:34 – Matt is on Twitter and most socials as @halfmatthalfcat and @couchmatehq Links 📄 References https://en.wikipedia.org/wiki/Electronic_program_guide https://www.gracenote.com/on-entertainment-tv-listings/ https://en.wikipedia.org/wiki/Language_Integrated_Query https://tenor.com/ ⚙️ Tech Stack akka → scala → react-native → cloudflare → digitalocean → github-actions → grafana → kamon → kubernetes → lets-encrypt → mailgun → pingdom → postgres → prometheus → redis → sentry → slack → terraform → vercel → 🛠 Libraries Used https://github.com/redis/jedis https://github.com/lloydmeta/enumeratum https://scala-slick.org/ https://material-ui.com/ https://github.com/reduxjs/redux https://helm.sh/ https://github.com/kubernetes-sigs/external-dns https://github.com/fastlane/fastlane 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.
undefined
Jul 12, 2021 • 53min

Managing 40+ Servers in a Data Center at a Medical University

In this episode of Running in Production, Maciej Delmanowski talks about building out a 40+ server / 200+ VM data center with Ansible. It’s hosted on premises, he’s been working on it all since 2007 and started using Ansible in 2013. Maciej talks about automating everything with Ansible, being a sysadmin for over a decade, how he picked Debian, splitting up a project into 120+ git repos and then back to 1, writing 60k+ lines of YAML, using Linux Containers, maintaining an open source project and more. Topics Include 2:35 – There’s about 40 physical servers and 200+ virtual machines / containers 4:50 – Transitioning to using Ansible over time 7:40 – A 10+ year friendship stemming from Debian and open source 8:23 – How Ansible’s role and inventory abstractions help manage a lot of VMs 10:35 – How DebOps as a name came into existence and its philosophy on being stable 14:24 – Motivation for choosing and staying with Debian 15:31 – Figuring out what new Ansible roles and playbooks to work on 19:14 – Going from a mono repo to 120+ repos and then back to a mono repo 24:48 – 67,000+ lines of YAML and 40,000+ lines of documentation 26:28 – Setting up a brand new server with Ansible and DebOps hands free in 15 minutes 28:29 – Automatically generating random passwords for services 31:22 – Not having to deal with HIPAA compliance laws and handling student emails 34:01 – Let’s Encrypt is being used on specific publicly accessible servers 34:26 – Breaking down the process of creating a new role from scratch 36:39 – Using Linux Containers in development and rolling things out to production 41:41 – Using dnsmasq in development for fully qualified domain names 43:07 – Dealing with backing everything up 46:02 – Being a maintainer of an open source project that’s extracted from work 49:19 – Best tips? Have 1 role for 1 service and find ways to connect them 51:26 – Check out DebOps, it’s on GitHub, #debops on Libera and Maciej is on Twitter Links 📄 References https://en.wikipedia.org/wiki/Orson_Scott_Card_bibliography https://github.com/nickjj/ansigenome https://github.com/nickjj/rolespec https://linuxcontainers.org/ https://en.wikipedia.org/wiki/Dnsmasq ⚙️ Tech Stack ansible → python → bash → debian → lets-encrypt → open-source → 🛠 Libraries Used https://www.veeam.com/virtual-machine-backup-solution-free.html https://rsnapshot.org/ https://libera.chat/ (we’re in #debops) 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.
undefined
Jul 5, 2021 • 1h 8min

Avo Is a Framework for Creating Ruby on Rails Admin Panels

In this episode of Running in Production, Adrian Marin goes over building a Ruby on Rails admin framework. It’s hosted on Heroku and has been available since late 2020. Adrian talks about building a Rails engine, using Stripe Checkout, building the admin out with Hotwire Turbo, using View Component, creating a very automated CI / CD pipeline to publish the gem and much more. Topics Include 6:38 – Motivation for using Ruby on Rails 8:57 – The gem does phone home on a 1 hour interval 11:33 – The gem is using Hotwire Turbo but the product site is not 13:10 – Handling billing with Stripe’s Checkout page and a few Rails gems 16:43 – Publishing a Rails engine with its own assets 21:10 – Using Hotwire Turbo to build the admin dashboard 26:30 – What it was like migrating the app from Vue to Turbo 31:49 – Using View Component to help improve Rails partial performance 39:21 – Postgres is being used as the database and Redis for caching 42:30 – What is Hotjar, how it’s being used and extracting features 46:36 – From Notion to Linear to using GitHub to help manage the project 49:44 – Using Heroku for hosting and what delayed job is being used for 54:55 – What it’s like deploying the site and the gem 1:01:19 – Performing database backups? Maybe, maybe not! 1:03:57 – Best tips? Start building and launch as soon as possible 1:06:06 – The gem has an open source version that’s very usable 1:07:03 – Check out https://avohq.io/ and Adrian is on Twitter Links 📄 References https://guides.rubyonrails.org/engines.html https://github.com/avo-hq/avo https://world.hey.com/dhh/building-basecamp-4-405a347f https://viewcomponent.org/ https://www.notion.so/ ⚙️ Tech Stack rails → ruby → bugsnag → docker → github-actions → heroku → hotjar → mailgun → open-source → postgres → redis → stripe → tailwindcss → turbo → 🛠 Libraries Used https://hotwire.dev/ https://github.com/alpinejs/alpine https://github.com/heartcombo/devise https://github.com/collectiveidea/delayed_job https://github.com/excid3/prefixed_ids https://github.com/github/view_component 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.
undefined
Jun 28, 2021 • 1h 7min

Optidash Is an Image Processing and Optimization API

In this episode of Running in Production, Przemek Matylla talks about building an image processing and optimization API with mostly C, Python and Node. It’s hosted on bare metal servers in a data center and has been running in production since 2019. Przemek talks about handling 20-50 million+ daily API calls, how they’re using C, image detection techniques, using Lua scripting with nginx, building their own servers in a data center, using boring technology and much more. Topics Include 3:17 – An average day has about 20 million API calls, busy days have 50m+ 4:11 – Breaking down where C, Node and other languages are being used 6:46 – What happens when you upload an image to their API 9:06 – Really figuring out the file type of something that’s been uploaded 11:54 – Dealing with edge cases as they come up but preparing a bit ahead of time 14:45 – Switching from Core ML on Apple hardware to Tensorflow on AMD hardware 19:43 – There’s no framework sitting on top of the Node API server 22:28 – The customer facing web dashboard is using Express, the marketing site is Jekyll 24:41 – They’re mostly B2B so feature requests end up being 1 on 1 calls 25:23 – Handling payments with Stripe and using a Node / Angular app for it 28:04 – Using Lua with nginx for rate limiting, also nginx is their load balancer 31:05 – You can’t go wrong with boring and predictable technology 31:47 – MongoDB, Redis and Elasticsearch are all running on 3 nodes each 32:18 – Having nearly instant access to a ton of data helps figure things out 34:52 – What it was like finding a freelance C developer 35:55 – Sending webhooks out is controlled by a separate Node Bull driven app 38:41 – Dealing with GDPR compliance and storing images on GlusterFS for 1 hour 40:50 – Going with bare metal servers in their own data center over the cloud 44:51 – The servers have 32-256GB of memory and a range of different CPUs 46:34 – Having spare parts and dealing with hardware failures 49:15 – About 50 servers run the latest Ubuntu LTS and are managed with Puppet 51:22 – The deployment process for a number of different services 54:19 – It takes ~30min to replace a drive and every service is tripled up 56:48 – The database servers are replicated and there’s alarms and alerts set up 58:56 – Rate limiting was put in place for limiting API calls to customers 1:01:12 – There’s custom payment rates depending on each customer’s requirements 1:03:06 – Best tips? Over provision like crazy and monitoring lets you sleep at night 1:03:31 – Do what works for you, don’t copy another company because it works for them 1:05:48 – Check out https://optidash.ai, their tech blog and GitHub account Links 📄 References https://www.techpowerup.com/gpu-specs/firepro-d700.c2555 https://www.amd.com/en/products/epyc https://first-colo.net/en/ https://www.backblaze.com/blog/backblaze-hard-drive-stats-q1-2021/ https://optirank.io/ ⚙️ Tech Stack express → node → angularjs → c → python → swift → jekyll → aws → cloudflare → docker → elasticsearch → firebase → glusterfs → influxdb → mailgun → mongodb → nginx → puppet → redis → server-density → 🛠 Libraries Used https://numpy.org/ https://developer.apple.com/documentation/coreml https://www.tensorflow.org/ https://github.com/OptimalBits/bull https://github.com/capistrano/capistrano https://www.influxdata.com/time-series-platform/telegraf/ 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.
undefined
Jun 21, 2021 • 1h 31min

CourseMaker Is an Online Course Builder for Technical Makers

In this episode of Running in Production, Chris Samiullah goes over building a video course hosting platform with FastAPI, Strapi and Gatsby. It’s hosted on ECS along with a bunch of AWS resources. It’s been running in production since early 2021. Chris talks about combining a Gatsby static site with FastAPI, using AWS Fargate, streaming videos with Cloudflare, supporting both Stripe and Paddle, using a bit of Serverless Lambdas and tons more. Topics Include 3:19 – Hiring outside contractors to tackle setting up the infrastructure 5:05 – Motivation for choosing Strapi, FastAPI, React, Gatsby and more 9:37 – Strapi is being used as a headless CMS for the student watching front-end 10:33 – Going over how the student watching experience is set up 14:20 – Creating a course preview with Fargate using sub-domains and DNS entries 16:35 – A couple Gatsby plugins that helped build the site 18:57 – A couple of Python libraries to help build out the FastAPI back-end 20:54 – Using Cloudflare for streaming the videos and Shaka as the video player 26:39 – Stripe and Paddle are being used to handle payments (including VAT) 37:35 – About 20k lines of Python and 10k lines of front-end / React code 39:53 – Everything is Dockerized, there’s PostgreSQL and an ALB too 43:30 – Using Let’s Encrypt and letting course owners hook up custom domain names 45:05 – Reasons for choosing AWS and ECS (hosting is about $100 to $150 a month) 51:45 – Having a dev (staging) server and production in different regions 53:27 – What it’s like coding things up in development and pushing them to production 58:42 – The dev experience for using AWS Lambdas and creating internal tooling 1:05:59 – On-boarding new authors (doing something that doesn’t scale but it works now) 1:10:33 – A public service announcement about database migrations 1:13:13 – FastAPI has been working very nicely 1:16:41 – Backing up the database and user generated files 1:19:56 – Using Sentry for tracking errors and getting notified over Slack 1:25:35 – Best tips? Pick a hosting infrastructure that fits your project 1:27:44 – Picking between ECS and EKS was left to the contractor 1:30:03 – Check out https://coursemaker.org/, Chris is on Twitter and LinkedIn too Links 📄 References https://www.gatsbyjs.com/docs/conceptual/how-shadowing-works/ https://github.com/encode/starlette http://paulgraham.com/ds.html ⚙️ Tech Stack fastapi → python → node → react → acm → aws → cloudflare → cloudfront → codedeploy → docker → ecs → fargate → github-actions → lambda → lets-encrypt → paddle → postgres → route53 → s3 → sentry → serverless → ses → slack → static-site → stripe → terraform → uptime-robot → 🛠 Libraries Used https://github.com/strapi/strapi https://github.com/sqlalchemy/sqlalchemy https://github.com/Delgan/loguru https://github.com/docopt/docopt https://github.com/google/shaka-player https://github.com/iconfinder/pyvat 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.

The AI-powered Podcast Player

Save insights by tapping your headphones, chat with episodes, discover the best highlights - and more!
App store bannerPlay store banner
Get the app