We have a SaaS application that allows customers to use their own domain – pretty typical. At its core, the architecture has a simple catch-all virtual host (apache) and the software does the work of resolving which customer it is based on the hostname.
However, many of our customers require that custom domain to support SSL. Currently we do this by adding a (higher precedence) virtual host with an SSL certificate and restarting apache.
While this works, it has a number of issues:
You either have to restart apache which means momentary downtown, or switch the dns to an entirely new server stack.
On the off chance there is an issue we didn't catch with the SSL certificate, Apache throws a fatal error and will not be able to restart.
It would be impossible or at least impractical to roll this out to thousands of users.
In short – it doesn't scale. We've explored SSL termination at the load balancer...it's promising, but we can't find any load balancers that support multiple SSL certificates (via SNI).
Moving forward this is increasingly a bottle neck of the product – to the point we would be willing to alter architecture or move away from apache if needed.