
Rfc 2109 stipulates that user agents support a cookie size of "at least 4096 bytes per cookie". however, this value has become the standard maximum cookie size supported by many implementations, so if your server sends larger cookies considerable breakage may occur.
cgi::cookie::splitter provides a pretty simple interface to generate small cookies that are under a certain limit, without wasting too much effort.