Hi cjb,
Its both possible each with its own (dis)-advantage..
If you leave the certificates on the webservers then haproxy only has to forward the tcp traffic which is a pretty simple job so little cpu usage on haproxy.
-only a few acl conditions that are available in 'mode tcp' (basically only the SNI name can be checked among a few others L4 fetches.)
-Higher cpu usage for decryption on webservers (probably easy to add more webservers in case cpu usage reaches 100% cpu..)
-Lower cpu usage on haproxy
If you put the crertificates on haproxy
-'mode http' with all advantages that come with that:
-allows inserting/rewriting http headers (x-forwarded-for header)
-and allows writing acl's for specific paths or other conditions with full access to all L7 information.
-more detailed logging
-centralized certificate management. (1 place to upgrade every X time.)
-Higher cpu usage on haproxy (hard to scale up once haproxy reaches 100% cpu..)
-Lower cpu usage for decryption on webservers
-might cause issues with website if forwarded over :80 where it will try to redirect the client to :443 even though the actual request was already made over 443, as a workaround you could then reencrypt the communication on backend side, this would then increase cpu usage on haproxy even more, and the lower cpu on the webserver wouldn't be applicable, though for that last part you could use a 'easy' cipher on backend..
There might be some other differences i'm forgetting to mention a.t.m. … Anyway youl have to decide if you want more features on haproxy, or need to be conservative with cpu resources.
Regards,
PiBa-NL