Skip to content

Deploying Feedmixer

Introduction

Feedmixer is a lightweight web service that aggregates and combines multiple RSS or Atom feeds into a single unified feed. It solves the common problem of wanting to subscribe to content from multiple sources through a single feed URL in your RSS reader.

Built with Python and Flask, Feedmixer is designed for simplicity and efficiency. It fetches feeds on-demand, combines their entries, sorts them by date, and serves the result as either RSS, Atom, or JSON format. This makes it perfect for creating topic-specific feeds, combining related news sources, or building custom content streams.

Key highlights of Feedmixer:

  • Feed Aggregation: Combine unlimited feeds into one
  • Multiple Output Formats: Serve as RSS, Atom, or JSON
  • On-Demand Fetching: Feeds are fetched when requested, ensuring fresh content
  • URL-Based Configuration: Define feeds entirely through URL parameters
  • Lightweight: Minimal resource requirements
  • Caching Support: Built-in caching to reduce upstream requests
  • Title Customization: Set custom titles for mixed feeds
  • Entry Limits: Control the number of entries returned
  • Open Source: Simple Python codebase easy to extend

This guide walks through deploying Feedmixer on Klutch.sh using Docker.

Why Deploy Feedmixer on Klutch.sh

Deploying Feedmixer on Klutch.sh provides several advantages:

Always Available: Your feed aggregation service runs 24/7 without managing infrastructure.

Public Endpoints: Create shareable feed URLs that anyone can subscribe to.

HTTPS by Default: Secure feed URLs that work with all RSS readers.

Low Maintenance: Simple application with minimal ongoing management.

Quick Deployment: Get up and running in minutes with Docker.

Prerequisites

Before deploying Feedmixer on Klutch.sh, ensure you have:

  • A Klutch.sh account
  • A GitHub account with a repository for your configuration
  • A list of RSS/Atom feed URLs you want to combine
  • Basic familiarity with Docker

Understanding Feedmixer Architecture

Feedmixer has a simple architecture:

Flask Web Server: Handles HTTP requests and serves combined feeds.

Feed Fetcher: Retrieves and parses source feeds using the feedparser library.

Feed Mixer: Combines entries from multiple feeds and sorts by date.

Output Generator: Produces RSS, Atom, or JSON output.

Preparing Your Repository

Create a GitHub repository with your Feedmixer configuration.

Repository Structure

feedmixer-deploy/
├── Dockerfile
└── .dockerignore

Creating the Dockerfile

FROM python:3.11-slim
WORKDIR /app
# Install dependencies
RUN pip install --no-cache-dir \
flask \
feedparser \
werkzeug \
gunicorn \
feedgenerator
# Copy application code
RUN pip install feedmixer
# Set environment variables
ENV FLASK_ENV=production
ENV FEEDMIXER_CACHE_TIME=${CACHE_TIME:-300}
# Expose port
EXPOSE 8080
# Run with gunicorn
CMD ["gunicorn", "--bind", "0.0.0.0:8080", "--workers", "2", "feedmixer:app"]

Alternative: Custom Feedmixer Implementation

For more control, create your own simple feed mixer:

FROM python:3.11-slim
WORKDIR /app
RUN pip install --no-cache-dir \
flask \
feedparser \
feedgenerator \
gunicorn \
requests
COPY app.py /app/
EXPOSE 8080
CMD ["gunicorn", "--bind", "0.0.0.0:8080", "--workers", "2", "app:app"]

Environment Variables Reference

VariableRequiredDescription
CACHE_TIMENoCache duration in seconds (default: 300)
MAX_ENTRIESNoMaximum entries per feed (default: 100)
REQUEST_TIMEOUTNoFeed fetch timeout in seconds (default: 30)

Deploying Feedmixer on Klutch.sh

    Push Your Repository to GitHub

    Commit your Dockerfile to your GitHub repository.

    Create a New Project on Klutch.sh

    Navigate to the Klutch.sh dashboard and create a new project named “feedmixer” or “rss-aggregator”.

    Create a New App

    Create a new app and connect your GitHub repository.

    Configure HTTP Traffic

    Set up HTTP traffic:

    • Select HTTP as the traffic type
    • Set the internal port to 8080

    Set Environment Variables

    Configure optional environment variables:

    VariableValue
    CACHE_TIME300
    MAX_ENTRIES50

    Deploy Your Application

    Click Deploy to build and launch Feedmixer.

    Test Your Deployment

    Once deployed, test by creating a mixed feed URL with your source feeds.

Using Feedmixer

Basic Usage

Create mixed feed URLs by passing feed URLs as parameters:

https://your-app.klutch.sh/atom?f=https://feed1.com/rss&f=https://feed2.com/atom

URL Parameters

ParameterDescription
fFeed URL to include (can be repeated)
nNumber of entries to return
titleCustom title for the mixed feed

Output Formats

Request different formats using different endpoints:

  • /atom - Atom format
  • /rss - RSS format
  • /json - JSON format

Example URLs

Combine Two Tech News Feeds:

https://your-app.klutch.sh/rss?f=https://news.ycombinator.com/rss&f=https://lobste.rs/rss

Custom Title with Limited Entries:

https://your-app.klutch.sh/atom?f=https://blog1.com/feed&f=https://blog2.com/feed&title=My%20Combined%20Feed&n=20

Use Cases

Topic Aggregation

Combine feeds on similar topics:

  • All company blogs into one feed
  • Multiple news sources on a specific subject
  • Related podcast feeds

Personal Feed Curation

Create custom feeds for:

  • Following specific authors across platforms
  • Aggregating project updates
  • Monitoring competitor news

Team Feeds

Build shared feeds for:

  • Industry news monitoring
  • Customer feedback aggregation
  • Research topic tracking

Caching Behavior

Feedmixer caches fetched feeds to reduce load on source servers:

  • Default cache time is 5 minutes
  • Cache is per-source-feed
  • Mixed feed is generated fresh from cached sources

Adjust CACHE_TIME environment variable to change caching behavior.

Error Handling

Feedmixer handles common errors gracefully:

Unavailable Feeds: If a source feed is unreachable, it is skipped and other feeds are still included.

Invalid Feeds: Malformed feeds are skipped with a warning.

Timeout: Slow feeds are skipped after the timeout period.

Performance Considerations

Optimizing for Speed

  • Use fewer source feeds for faster response
  • Increase cache time for less frequently updated feeds
  • Limit entry count with the n parameter

Resource Usage

Feedmixer is lightweight:

  • Minimal memory footprint
  • Low CPU usage
  • Network-bound performance

Troubleshooting

Empty Feed Response

  • Verify source feed URLs are accessible
  • Check that feeds contain valid RSS/Atom content
  • Review application logs for fetch errors

Slow Response Times

  • Reduce number of source feeds
  • Increase cache time
  • Check source feed server response times

Invalid Feed Errors

  • Validate source feeds with an RSS validator
  • Check for encoding issues in source feeds

Additional Resources

Conclusion

Deploying Feedmixer on Klutch.sh provides a simple yet powerful solution for RSS/Atom feed aggregation. Whether you are combining news sources, creating topic-specific feeds, or building custom content streams, Feedmixer’s URL-based approach makes it easy to create and share mixed feeds.

The lightweight nature of Feedmixer combined with Klutch.sh’s reliable hosting creates an ideal setup for personal or team feed aggregation needs.