juspay / hyperswitch

An open source payments switch written in Rust to make payments fast, reliable and affordable
https://hyperswitch.io/
Apache License 2.0
12.3k stars 1.32k forks source link

Clickhouse - split the ingestion & query tables in separate databases for better access control #3395

Closed ivor11 closed 9 months ago

ivor11 commented 9 months ago

In order to support our earlier use case where we wanna reduce user confusion etc for tables on grafana,

we've decided to restrict grafana (and application) access to query tables only.

in order to do this we've decided to separate the query & ingestion database names

table format - hyperswitch_<env>_pub for query tables & hyperswitch_<env> for ingestions tables

with this format we will be creating new databases with the _pub suffix

in this case the Kafka & MV tables would reside in the private db while the cluster & audit tables would reside in the public database...

as part of this let's also delete the dist tables and query directly from cluster tables since we don't use sharding... in this case we'll rename the clustered tables to remove the clustered suffix e.g payment_attempt_clustered -> payment_attempt

The following action items need to be taken

ivor11 commented 9 months ago

can we split roles & acl into a separate task?