How Posthaven Delivers Forever Content

By Kellen 

Sometime during the early nineties, it was time to put my permanent mark on the World Wide Web. What better place, I appraised, than GeoCities. After a time, my blog's neighbourhood was relocated. Some time later, GeoCities was purchased to the tune of further changes and relocations. Eventually, the entire network was shuttered. My site, and whatever weird things I put there, were forever lost in the ether. We all have a sad story about the last place we tried to host our blog... Except for those who started blogging on Posthaven.

Meet Posthaven

Posthaven is an affordable blog hosting service that promises to battle the uncertainty of time. Their vision is to create the "world's simplest, most usable, most long-lasting blogging platform". The vision is strong! Offering up to 10 customizable sites for 5$ per month, subscribers can feel confident that their pages will remain stable amidst the chaos of a rapidly changing Internet.

Forever hosting is a lofty promise. To accomplish this, Posthaven charges money instead of trying to scrape advertisement dollars out of eyeballs. They promise to never sell their service, no matter the offer. In exchange for a monthly investment, Posthaven agrees to steadily craft their service with longevity in mind. They've taken the role of Data Custodians, tending to on-going feature development and server upkeep "the way a good caretaker would tend a garden".

A good caretaker would need to have a discerning eye for which services and tools they tie to their gardens. Not getting too excited about shiny new things with dazzling features is part of the job; shiny things can be fleeting!

Forever Machines

Posthaven subscribers receive a permanent hostname:, with the option of using their own customized hostname: To serve thousands of impressions from hundreds of blogs on secured and permanent hostnames, you need to have capable infrastructure. To keep up with modern web features like HTTPS and HTTP/2, you need to have capable and sophisticated infrastructure. That's why Posthaven chose Fly.

Previously, Posthaven served pages from a fleet of EC2s hosted on Amazon Web Services. To generate SSL certificates, they applied OpenResty. OpenResty is a suped up implementation of Nginx; it contains LuaJIT and other Lua and third-party Nginx modules. Through OpenResty, they applied a third-party library to generate Let's Encrypt certificates. Then, to load balance all of their traffic, they used HAProxy.

Now they host their application on a stand-alone P-a-a-S with Fly out-front. They use the Fly API to serve up automatically renewing Let's Encrypt SSL certificates for custom hostnames. Posthaven receives HTTPS, HTTP/2, global load balancing and SSL termination. The result is a faster user experience for every blog under their trusty umbrella. Simplicity lasts and Posthaven has slashed their complexity.

Unique Hostnames for All Your Customers

With the Fly API, SSL certificates are a call away - you need only send a POST with the hostname you'd like to sign. In return, you receive an encrypted preview hostname. By handling DNS for the preview hostname, you can offer an unlimited number customers their own unique, automatically renewing, SSL-fortified hostname.

"The main thing about the API integration code is how little there is, like 15 LOC including the API adapter class and no additional libraries needed." - Posthaven

Posthaven does this with little more than a Rails method:

  def self.create_hostname(hostname)
    params = { data: { attributes: { hostname: hostname } } }
    response = post("/hostnames/", {
      body: params

Trusting Fly to generate SSL certificates and serve fast pages to a global user-base, Posthaven can focus on delivering features to their users. They no longer need to concern themselves with obscure OpenSSL vulnerabilities, web server patching, and load balancing algorithms. The humble Data Custodians have one less garden to tend to.

Posthaven + Fly

"So far the biggest win is not wrangling SSL-certificates or having to manage load balancers with Nginx and HAProxy or keep those up to date with security patches on them", says Posthaven. Offloading the maintenance costs and complexity means they can look to more simple and efficient methods for hosting their pages and more streamlined deployment processes to ship features.

"Because we allow our users to bring their own domain, an Elastic Load Balancer isn't an option and we can't really use Heroku by itself. So the longer term benefit that attracted us to Fly is a lot of flexibility in where our application servers are running. If we decide to migrate to using containers on AWS or use a service like Heroku, moving the traffic over is much simpler with Fly in front."

Posthaven's promise of forever content has attracted some wise and prolific writers and organizations. They continue to grow, add useful features, and remain steady in the fleeting world of web services. Fly is proud to aid them on their quest. You can learn more about Fly's Unique Hostname for All Your Customers offering here.

Fly started when we wondered "what would a programmable edge look like"? Developer workflows work great for infrastructure like CDNs and optimization services. You should really see for yourself, though.