policies_last_updated endpoint can be used by policy agents to determine if they need to pull new policies.
This will help with resource consumption on database VM and overall traffic going through the system. Since policy agents default to polling policies every 5s this is especially visible as a problem in environments with hundreds of Diego cells and thousands of policies.
In this PR:
new table is added to policy server database policies_info with the field last_updated. Field id is added as primary key because mysql percona complains that table must have a primary key.
the table is updated in the same transaction as creating and deleting policies.
policies_last_updated endpoint can be used by policy agents to determine if they need to pull new policies.
This will help with resource consumption on database VM and overall traffic going through the system. Since policy agents default to polling policies every 5s this is especially visible as a problem in environments with hundreds of Diego cells and thousands of policies.
In this PR:
policies_info
with the fieldlast_updated
. Fieldid
is added as primary key because mysql percona complains that table must have a primary key.