{"id":93,"date":"2025-05-04T12:03:27","date_gmt":"2025-05-04T12:03:27","guid":{"rendered":"https:\/\/free-shoutcast.com\/blog\/?p=93"},"modified":"2025-05-08T05:54:39","modified_gmt":"2025-05-08T05:54:39","slug":"how-we-scaled-our-shoutcast-hosting-with-kubernetes","status":"publish","type":"post","link":"https:\/\/free-shoutcast.com\/blog\/how-we-scaled-our-shoutcast-hosting-with-kubernetes\/","title":{"rendered":"How we scaled our ShoutCast hosting with Kubernetes"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">At <a class=\"\" href=\"https:\/\/free-shoutcast.com\">Free-Shoutcast.com<\/a>, we provide free internet radio hosting powered by ShoutCast. As our user base grew, our legacy infrastructure &#8211; based on manually managed VPS instances &#8211; began to show its limits. We needed a way to scale quickly, improve uptime, and simplify operations. That\u2019s when we turned to Kubernetes.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">The challenge<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Our original setup involved individual virtual servers, each configured to run a few Shoutcast instances. This became increasingly difficult to manage:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Scaling during peak hours required manual intervention<\/li>\n\n\n\n<li>Server resources were often underutilized<\/li>\n\n\n\n<li>Deployments were error-prone and time-consuming<\/li>\n\n\n\n<li>Monitoring and fault recovery were limited<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">We needed a platform that could dynamically scale, recover from failures automatically, and be easy to maintain.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Why Kubernetes?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Kubernetes provided exactly what we were looking for:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Container orchestration<\/strong> to run multiple Shoutcast streams reliably<\/li>\n\n\n\n<li><strong>Auto-scaling<\/strong> based on usage and load<\/li>\n\n\n\n<li><strong>Self-healing<\/strong> to automatically recover from failures<\/li>\n\n\n\n<li><strong>Infrastructure as code<\/strong> for versioned, repeatable deployments<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">It gave us the flexibility to scale horizontally while reducing operational overhead.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Our implementation<\/h3>\n\n\n\n<h4 class=\"wp-block-heading\">1. <strong>Containerizing Shoutcast<\/strong><\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">We built a custom Docker image for Shoutcast, containing all necessary configs and startup scripts. This allowed us to standardize the environment across all nodes.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">2. <strong>Stateful workloads<\/strong><\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">Since each stream requires a consistent identity (e.g., port number, config files), we used <strong>StatefulSets<\/strong> instead of Deployments. This ensured persistent configuration and predictable DNS names across restarts.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">3. <strong>Configuration and secrets<\/strong><\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">Stream settings (like titles, ports, limits) were moved to <strong>ConfigMaps<\/strong>, while sensitive data (stream keys, admin passwords) were stored securely using <strong>Secrets<\/strong>.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">4. <strong>Ingress and networking<\/strong><\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">We implemented an <strong>NGINX Ingress Controller<\/strong> to route public traffic to the correct stream pods. This setup supports HTTPS, hostname-based routing, and simplified exposure of services.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">5. <strong>Monitoring and auto-healing<\/strong><\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">We added Kubernetes <strong>liveness and readiness probes<\/strong> to detect unhealthy instances and restart them automatically. <strong>Prometheus<\/strong> and <strong>Grafana<\/strong> provide insights into system health, listener metrics, and resource usage.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">6. <strong>Auto-scaling<\/strong><\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">Using <strong>Horizontal Pod Autoscalers<\/strong>, we can dynamically adjust the number of stream pods based on CPU usage or active listener count. This keeps the system efficient under varying loads.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">The results<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Since adopting Kubernetes, we\u2019ve achieved major improvements:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>99.99% uptime<\/strong><br>Kubernetes\u2019 self-healing and rolling deployments keep services online even during failures or updates.<\/li>\n\n\n\n<li><strong>40% better resource efficiency<\/strong><br>Smart pod scheduling and autoscaling cut our server costs and reduced waste.<\/li>\n\n\n\n<li><strong>Instant scaling<\/strong><br>We can deploy new radio streams or scale existing ones in seconds &#8211; no more manual setup.<\/li>\n\n\n\n<li><strong>Simplified maintenance and deployment<\/strong><br>Updates are rolled out through CI\/CD pipelines using Helm charts, reducing downtime and deployment errors.<\/li>\n\n\n\n<li><strong>Better monitoring and troubleshooting<\/strong><br>Centralized logging and metrics help us detect and resolve issues faster than ever.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Challenges we faced<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The migration wasn\u2019t without hurdles:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Persistent storage<\/strong> added complexity for stream configs, which we solved using Kubernetes volumes.<\/li>\n\n\n\n<li><strong>Ingress tuning<\/strong> took some trial and error to support many streams behind a single entry point.<\/li>\n\n\n\n<li><strong>Kubernetes has a learning curve<\/strong>, but the long-term benefits made the effort worthwhile.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Partnering with CloudPanda.io<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">We worked closely with <a class=\"\" href=\"https:\/\/cloudpanda.io\">CloudPanda.io<\/a>, whose team helped us design and implement our Kubernetes architecture. Their expertise was key in building a production-ready, scalable solution from the ground up. From container optimization to network design, they were an invaluable partner.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">What\u2019s next<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">We\u2019re are now planning to follow more <a href=\"https:\/\/cloudpanda.io\/blog\/benefits-cloud-migration\" data-type=\"link\" data-id=\"https:\/\/cloudpanda.io\/blog\/benefits-cloud-migration\">benefits related to cloud migration<\/a>, what includes:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Multi-region deployments<\/strong> for improved latency and fault tolerance<\/li>\n\n\n\n<li><strong>GitOps workflows<\/strong> to further automate deployments and rollbacks<\/li>\n\n\n\n<li><strong>Custom Kubernetes operators<\/strong> to manage Shoutcast-specific logic at scale<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Conclusion<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Migrating to Kubernetes was a major turning point for Free-Shoutcast.com. We now run a scalable, resilient platform that supports thousands of streams with ease.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Thanks to Kubernetes &#8211; and to our partners at <a class=\"\" href=\"https:\/\/cloudpanda.io\">CloudPanda.io<\/a> &#8211; we\u2019re better equipped than ever to serve internet radio broadcasters around the world.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><em>Interested in launching your own radio station or learning more about our stack? Visit us at <a class=\"\" href=\"https:\/\/free-shoutcast.com\">Free-Shoutcast.com<\/a>.<\/em><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>At Free-Shoutcast.com, we provide free internet radio hosting powered by ShoutCast. As our user base grew, our legacy infrastructure &#8211; based on manually managed VPS instances &#8211; began to show its limits. We needed a way to scale quickly, improve uptime, and simplify operations. That\u2019s when we turned to Kubernetes. The challenge Our original setup [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":97,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[4],"tags":[],"class_list":["post-93","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-our-service"],"acf":[],"_links":{"self":[{"href":"https:\/\/free-shoutcast.com\/blog\/wp-json\/wp\/v2\/posts\/93","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/free-shoutcast.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/free-shoutcast.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/free-shoutcast.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/free-shoutcast.com\/blog\/wp-json\/wp\/v2\/comments?post=93"}],"version-history":[{"count":4,"href":"https:\/\/free-shoutcast.com\/blog\/wp-json\/wp\/v2\/posts\/93\/revisions"}],"predecessor-version":[{"id":100,"href":"https:\/\/free-shoutcast.com\/blog\/wp-json\/wp\/v2\/posts\/93\/revisions\/100"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/free-shoutcast.com\/blog\/wp-json\/wp\/v2\/media\/97"}],"wp:attachment":[{"href":"https:\/\/free-shoutcast.com\/blog\/wp-json\/wp\/v2\/media?parent=93"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/free-shoutcast.com\/blog\/wp-json\/wp\/v2\/categories?post=93"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/free-shoutcast.com\/blog\/wp-json\/wp\/v2\/tags?post=93"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}