I am creating a RESTful API and wondering how expensive it is for the server if every request is made using SSL? This is probably hard to measure, but comparing with non-SSL requests would be helpful (e.g. 1 SSL was as expensive as 30 requests without SSL).
I understand correctly that in order to establish an SSL connection, both parties need to generate public and private keys, share them with each other and then start communication. If using the RESTful API, is this process performed for each request? Or is there some kind of caching that reuses a key for a given host for a certain period of time (if so, how long do they end?).
And the last question, the reason I ask is that I am creating an application that uses facebook connection, and there are some access tokens that provide access to facebook user account, saying this why facebook allows you to transfer these access tokens over unencrypted connections? Of course, they should protect access tokens as much as the username / passwd commands, and thus use an SSL connection ... but they do not.
EDIT: facebook does provide an HTTPS connection whenever an access_token is passed.
source share