razorpay / alohomora

alohomora is razorpay's secret distribution system
32 stars 3 forks source link

[performance] lazy lookup to dynamodb #18

Open Hashfyre opened 7 years ago

Hashfyre commented 7 years ago

create the base credstash object (which does a getall() on the dynamodb) only when jinja2 encounters the first {{lookup()}}.

Usage: For templating nginx.conf where no {{lookup()}} is present, alohomora would never do a credstash getall thus enhancing templating performance.

This follows the at most once paradigm for getting secrets from credstash.

Hashfyre commented 7 years ago

This will also help us resolve: https://github.com/razorpay/raven/pull/88#discussion_r145928505

captn3m0 commented 7 years ago

Sounds like a good idea.

captn3m0 commented 5 years ago

This is resolved and live.