Closes #101 (closed)
- Added parameters to allow config of Authz Service API (to use QA for example
- Added Cache TTL parameter
- Now use /precomputed for Grappa GetMembers
- Optimized Channel.isAdmin to reduce GetMembers calls
- Added
pg_stats_statements
module to postgres for local deployments indocker-compose-service-shared.yml
to facilitate query perf tuning (https://www.geekytidbits.com/performance-tuning-postgres/)- connect pg and run :
CREATE EXTENSION pg_stat_statements;
- then
SELECT * FROM pg_stat_statements ORDER BY total_exec_time DESC;
- if you need to reset the data
SELECT pg_stat_statements_reset();
- if you need to reset the data
- then get the long query and
EXPLAIN ANALYSE paste_the_query_here
- psql tips:
- Show timing of queries:
\timing
- enable disable pages results:
\pset pager
- Show timing of queries:
- connect pg and run :
- Replace Cache module by Memoizee module (https://www.npmjs.com/package/memoizee) to prevetn too many parralel requests to GRAPPA that kill the service by triggering their anti-flood system
- Updated
typeorm
to latest (0.2.38) to address performance issue on home page with lots of channels + members - Fixed
skip/take
bug on long listsslice
(convertskip/take
to numbers) - Improve
find-all-channels
query. Thanks for Carina we now have a splitted query quite fast. - Improved add/remove members
General findings: https://codimd.web.cern.ch/3XokN3PjSeuUXqnRHsKZzg
New ENV:
AUTHORIZATION_SERVICE_API_AUDIENCE=authorization-service-api
AUTHORIZATION_SERVICE_API_TOKEN_URL=https://auth.cern.ch/auth/realms/cern/api-access/token
AUTHORIZATION_SERVICE_API_BASE_URL=https://authorization-service-api.web.cern.ch
# Optional Cache TTL, default 300
CACHE_GRAPPA_TTL=1200
#CACHE_TOKEN_TTL=300