Introducing OwnCDN

#owncdn

Introducing OwnCDN

OwnCDN is self-hosted CDN server software running as an IIS website on your own Windows computer/VM/VPS.

It does caching (disk/memory), replicated and versioned object storage (S3 compatible), and image resizing and optimization - effectively your own CDN node.

Services can be chained together in any order to provide a powerful system.
For example: HTTP Publisher → Disk Cache → Image Optimization → Blob/object storage.

OwnCDN is configurable through a web-based user interface.

It has a simple HTTP API which also supports Amazon S3 API syntax, making it compatible with a long list of software and services.

Features

File/object storage

Provide centralized file/object storage.

The "Storage service" provides versioned and replicable storage (like Amazon S3).

The "File System service" provides access to files in the local file system.

You can make store, retrieve, and delete files/object via the "HTTP API service" or provide public access to the files with the "HTTP Publisher" service.

Caching

Provide caching to bring files/objects closer to users, to serve files/objects faster, and/or to reduce traffic to origin servers.

The "Memory Cache service" provides temporary caching for files/objects which are requested very frequently and/or need very fast delivery (like Redis).

The "Disk Cache service" provides temporary file/object caching - persisted to disk so that it survives server restarts.

You can configure the cache services to retrieve files from a remote web-server using the "HTTP Fetcher service", or you can upload files via the "HTTP API service".

You can provide public access to the cached files with the "HTTP Publisher service".

Image Optimization

The "Image Optimization service" reduces image file size using and automatically scales and/or crops images.

OwnCDN origin story

My company (JH Software) also develop and run an educational platform with on-line tests and exercises for Danish elementary and middle schools - see https://tjek.net (Danish language only).

For years, we ran this as a single ASP.NET website under IIS on a Windows VPS (virtual private server) at various cloud providers. But when GDPR (EU privacy regulations) hit, it became difficult to be in compliance while keeping the data with cloud providers.

So, we decided to move the core of Tjek.net home to a server running in our own office where we can ensure privacy and security for our users in accordance with GDPR.

As part of Tjek.net, we also serve a lot of images and videos (not user-specific) as illustrations in the on-line tests and exercises, and we didn't want to serve these through the limited bandwidth of our office Internet connection.

Since we were still running a (now underutilized) Windows VPS at a cloud provider for other purposes, we wanted to try and use this for serving the images/videos and to cache some dynamically generated content from the office server.

This meant that we needed some kind of object storage software (like AWS S3) and web caching software (like a CDN) running on this server.

Since we couldn't find any suitable software for this, we started putting together our own.

After refining this software for several years, this is, of course, what eventually became OwnCDN.

Today OwnCDN is serving 250K+ images/videos for Tjek.net every day, while barely registering on the CPU usage chart on the VPS.

Check out OwnCDN at https://owncdn.com

Comments

Jesper Høy's
Dev Blog

  • Home (blog posts)
  • About me and this website
  • My developer tech stack
  • My favorite software
  • My favorite online services
  • Cool stuff
  • My side projects
  • Our wonderful ice horses
  • AI Statement