I am thinking to use property set by removing some of the key dependencies from kvm since kvm cache causing issues after updating the values, it takes it's own cache expiry time to reflect in the realtime especially in the lower env. I am trying understand the usage of property set much deeper.
Let's say I have a proxy/environment property variables A, B and C.
First api call will use Key A, not any other keys. 2nd api call will use Key B.
Question:
Irrespective of which key I use it will load all the properties in the context variables. Means, in the first api call I access only property key A, so I know it'll be loaded in the context memory, what about the Key B and C, will those be loaded too?
Please let me know if you need more information or clarification.
Thanks!
Solved! Go to Solution.
The cache for KVM means the performance of accessing the KVM Data will be good, especially after requests >1. A typical behavior will show ~4-8ms access time for KVM Read, in the first request. This then populates the cache. And then subsequent requests that use the same data will access it through the cache, which will take much less than 1ms. This access results in a few function calls and a memory read, basically. I estimate that would consume a few hundred CPU clock cycles, which equates to, I'm guessing, around 100 nanoseconds.
PropertySet data is always in memory for the API proxy, so the access time for the first request will be the same as the time for all subsequent requests, and it will be much less than 1ms. (same order of magnitude as above).
So I would say, runtime performance is not a distinguishing criteria to help you decide When you should use KVM vs PropertySets. Here is what distinguishes them:
Depending on whether those things are important, you can use one or the other. If none of these particularly matter, in my opinion, propertysets are easier to use, because the data is just bundled in the proxy configuration.
The cache for KVM means the performance of accessing the KVM Data will be good, especially after requests >1. A typical behavior will show ~4-8ms access time for KVM Read, in the first request. This then populates the cache. And then subsequent requests that use the same data will access it through the cache, which will take much less than 1ms. This access results in a few function calls and a memory read, basically. I estimate that would consume a few hundred CPU clock cycles, which equates to, I'm guessing, around 100 nanoseconds.
PropertySet data is always in memory for the API proxy, so the access time for the first request will be the same as the time for all subsequent requests, and it will be much less than 1ms. (same order of magnitude as above).
So I would say, runtime performance is not a distinguishing criteria to help you decide When you should use KVM vs PropertySets. Here is what distinguishes them:
Depending on whether those things are important, you can use one or the other. If none of these particularly matter, in my opinion, propertysets are easier to use, because the data is just bundled in the proxy configuration.
Thanks @dchiesa1 . Only correction I see from your answer is that property set can also be used with environment scope. But I got what I wanted, thanks for your explanation. Please let me know if there are anything different from what you mentioned for environment level properties.