<div dir="ltr">Re-sending Matt's reply since he is not subscribed to this mailing list and it bounced back.<div><br></div><div>---------------------------</div><div><br></div><div><span style="font-size:12.8px;font-weight:bold;white-space:nowrap">Matt Fischer wrote:</span><br></div><div><br></div><div><div dir="ltr" style="font-size:12.8px">Alexandr,<div><br></div><div>I would not use Fernet without caching, but that said I strongly recommend against UUID tokens for any reason. Make sure you setup caching on the swift side & the keystone side. You could consider than an L1 and L2 cache where from Swift's POV it's authtoken cache is L1 and keystone's cache is L2. If you do that I believe the performance will be acceptable. </div><div><br></div><div>The slowness comes when Keystone has to attempt to decrypt the uncached tokens.</div><div><br></div><div>Also if you're looking to squeeze out the last bit of performance from your keystone, using the deprecated (and not tested in the gate) Python-MySQL driver instead of pymsql is about 6% faster. That carries risks as it's untested and becoming less widely used. We switched to pymysql as has openstack-ansible and several other deployments.</div></div><div class="gmail-yj6qo gmail-ajU" style="font-size:12.8px"></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Dec 10, 2016 at 3:23 PM, Steve Martinelli <span dir="ltr"><<a href="mailto:s.martinelli@gmail.com" target="_blank">s.martinelli@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><span class="">On Sat, Dec 10, 2016 at 10:59 AM, Alexandr Porunov <span dir="ltr"><<a href="mailto:alexandr.porunov@gmail.com" target="_blank">alexandr.porunov@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Hello,<br></div><div><br></div><div>I read a blog about performance comparison between fernet and uuid tokens. They said that fernet tokens is 30% faster for creation but 400% slower for validation. Is it true?</div><div><br></div></div></blockquote><div><br></div></span><div>I assume you are reading Dolph's blog post [1], that data is based off of the kilo branch, we've made some improvements to performance since then, he should probably do a follow up post for how the same performance tests run on Newton ;)</div><div><br></div><div>Token validation can be improved using caching, which we worked on in Liberty, Mitaka and Newton (the latest Mitaka release (9.2.0) includes a critical performance fix, it was not backported to Liberty). Revocation events are still an issue for performance, but we've been addressing that in Ocata. I don't think we'll be able to backport the fixes for poor revocation performance though, unfortunately it goes against the backport policy.</div><div><br></div><div><br></div><div>FWIW, Matt Fischer has 4 blog posts about using fernet tokens in production [2], they are very detailed and performance oriented. I really recommend reading them, it's great stuff.</div><div><br></div><div><br></div><div>[1] <a href="http://dolphm.com/benchmarking-openstack-keystone-token-formats/" target="_blank">http://dolphm.com/<wbr>benchmarking-openstack-<wbr>keystone-token-formats/</a></div><div>[2] <a href="https://www.mattfischer.com/blog/?tag=fernet" target="_blank">https://www.mattfischer.<wbr>com/blog/?tag=fernet</a></div><div><br></div><div><br></div><div>stevemar<br></div><span class=""><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div></div><div>I want to use Keystone for Swift. I will have many requests with the same tokens so I need faster validation than faster creation. I would use uuid tokens but fernet tokens give us very good pros (we don't need to use a database). So, I decided to cache all fernet tokens on the Swift Proxy side for 30 minutes. Will the performance be the same for checking tokens in a cache or fernet tokens will still be 400% slower? </div><div><br></div><div>Sincerely,</div><div>Alexandr</div></div>
</blockquote></span></div><br></div></div>
</blockquote></div><br></div>