<div dir="ltr"><div class="gmail_default" style="font-family:verdana,sans-serif">Hi, all</div><div class="gmail_default" style="font-family:verdana,sans-serif"><br></div><div class="gmail_default"><font face="verdana, sans-serif">We have a benchmarking for openstack API, we found the performance is not</font></div>
<div class="gmail_default"><font face="verdana, sans-serif">very well. For instance, with 3000 flavors in database, get all flavors API TPS </font></div><div class="gmail_default"><font face="verdana, sans-serif">is 4 under 10 </font><span style="font-family:Arial,宋体,微软雅黑;color:rgb(50,50,50);font-size:14px;line-height:16px;white-space:nowrap">concurrency. With 1000 images in glance, get all images API TPS is</span></div>
<div class="gmail_default"><font color="#323232" face="Arial, 宋体, 微软雅黑"><span style="font-size:14px;line-height:16px;white-space:nowrap">roughly 3. The </span></font><span style="font-size:14px;line-height:16px;white-space:nowrap;color:rgb(50,50,50);font-family:Arial,宋体,微软雅黑">hardware is Intel(R) Xeon(R) E5640 @ 2.67GHz, 48G memory.</span></div>
<div class="gmail_default"><font color="#323232" face="Arial, 宋体, 微软雅黑"><span style="font-size:14px;line-height:16px;white-space:nowrap"><br></span></font></div><div class="gmail_default"><font color="#323232" face="Arial, 宋体, 微软雅黑"><span style="font-size:14px;line-height:16px;white-space:nowrap">As we know the most </span></font><span style="color:rgb(50,50,50);font-family:Arial,宋体,微软雅黑;font-size:14px;line-height:16px;white-space:nowrap">time-consuming in source code is ORM, so an </span><span style="color:rgb(51,51,51);font-family:Arial,宋体,微软雅黑;font-size:14px;line-height:21px">obvious</span><span style="color:rgb(51,51,51);font-family:Arial,宋体,微软雅黑;font-size:14px;line-height:21px"> solution</span></div>
<div class="gmail_default"><span style="color:rgb(51,51,51);font-family:Arial,宋体,微软雅黑;font-size:14px;line-height:21px"> is do cache in nova-conductor, but nova-api does not get objects from nova-conductor.</span></div><div class="gmail_default">
<span style="color:rgb(51,51,51);font-family:Arial,宋体,微软雅黑;font-size:14px;line-height:21px"><br></span></div><div class="gmail_default"><span style="color:rgb(51,51,51);font-family:Arial,宋体,微软雅黑;font-size:14px;line-height:21px">The easy way I can think of is inserting a cache system in API, maybe a WSGI middleware</span></div>
<div class="gmail_default"><span style="color:rgb(51,51,51);font-family:Arial,宋体,微软雅黑;font-size:14px;line-height:21px">in api-paste.ini for better reusability. Then we can insert cache system in any WSGI pipeline</span></div>
<div class="gmail_default"><span style="color:rgb(51,51,51);font-family:Arial,宋体,微软雅黑;font-size:14px;line-height:21px">bases application, like glance, neutron, etc. </span><span style="color:rgb(51,51,51);font-family:Arial,宋体,微软雅黑;font-size:14px;line-height:21px">The cache system is policy based. So different </span></div>
<div class="gmail_default"><span style="color:rgb(51,51,51);font-family:Arial,宋体,微软雅黑;font-size:14px;line-height:21px">API can have different expiry. For example, </span><span style="color:rgb(51,51,51);font-family:Arial,宋体,微软雅黑;font-size:14px;line-height:21px">if flavors not changes often, we can set expiry </span></div>
<div class="gmail_default"><span style="color:rgb(51,51,51);font-family:Arial,宋体,微软雅黑;font-size:14px;line-height:21px">of get flavors API to a bigger number. And instances </span><span style="color:rgb(51,51,51);font-family:Arial,宋体,微软雅黑;font-size:14px;line-height:21px">changes often, the expiry maybe 1 </span></div>
<div class="gmail_default"><span style="color:rgb(51,51,51);font-family:Arial,宋体,微软雅黑;font-size:14px;line-height:21px">second. The backend of cache varies, memory based, file based, also a dummy. The key</span></div><div class="gmail_default">
<span style="color:rgb(51,51,51);font-family:Arial,宋体,微软雅黑;font-size:14px;line-height:21px">of cache is a mixture of URL, querystring, and headers, and only work for "GET", "HEAD" </span></div><div class="gmail_default">
<span style="color:rgb(51,51,51);font-family:Arial,宋体,微软雅黑;font-size:14px;line-height:21px">requests.</span></div><div class="gmail_default"><span style="color:rgb(51,51,51);font-family:Arial,宋体,微软雅黑;font-size:14px;line-height:21px"><br>
</span></div><div class="gmail_default"><span style="color:rgb(51,51,51);font-family:Arial,宋体,微软雅黑;font-size:14px;line-height:21px">Make sense? Or another solution?</span></div>-- <br><div dir="ltr">Best regards,<div><div class="gmail_default" style="font-family:verdana,sans-serif;display:inline">
​TT </div>Gao</div></div>
</div>