mirror of
https://github.com/zitadel/zitadel.git
synced 2025-12-07 07:16:54 +00:00
remove ratios
This commit is contained in:
@@ -110,24 +110,13 @@ PublicHostHeaders: # ZITADEL_PUBLICHOSTHEADERS
|
||||
WebAuthNName: ZITADEL # ZITADEL_WEBAUTHNNAME
|
||||
|
||||
Database:
|
||||
# ZITADEL manages three database connection pools.
|
||||
# The *ConnRatio settings define the ratio of how many connections from
|
||||
# MaxOpenConns and MaxIdleConns are used to push events and spool projections.
|
||||
# Remaining connection are used for queries (search).
|
||||
# Values may not be negative and the sum of the ratios must always be less than 1.
|
||||
# For example this defaults define 15 MaxOpenConns overall.
|
||||
# - 15*0.2=3 connections are allocated to the event pusher;
|
||||
# - 15*0.135=2 connections are allocated to the projection spooler;
|
||||
# - 15-(3+2)=10 connections are remaining for queries;
|
||||
EventPushConnRatio: 0.2 # ZITADEL_DATABASE_COCKROACH_EVENTPUSHCONNRATIO
|
||||
ProjectionSpoolerConnRatio: 0.135 # ZITADEL_DATABASE_COCKROACH_PROJECTIONSPOOLERCONNRATIO
|
||||
# CockroachDB is the default database of ZITADEL
|
||||
cockroach:
|
||||
Host: localhost # ZITADEL_DATABASE_COCKROACH_HOST
|
||||
Port: 26257 # ZITADEL_DATABASE_COCKROACH_PORT
|
||||
Database: zitadel # ZITADEL_DATABASE_COCKROACH_DATABASE
|
||||
MaxOpenConns: 15 # ZITADEL_DATABASE_COCKROACH_MAXOPENCONNS
|
||||
MaxIdleConns: 12 # ZITADEL_DATABASE_COCKROACH_MAXIDLECONNS
|
||||
MaxOpenConns: 5 # ZITADEL_DATABASE_COCKROACH_MAXOPENCONNS
|
||||
MaxIdleConns: 2 # ZITADEL_DATABASE_COCKROACH_MAXIDLECONNS
|
||||
MaxConnLifetime: 30m # ZITADEL_DATABASE_COCKROACH_MAXCONNLIFETIME
|
||||
MaxConnIdleTime: 5m # ZITADEL_DATABASE_COCKROACH_MAXCONNIDLETIME
|
||||
Options: "" # ZITADEL_DATABASE_COCKROACH_OPTIONS
|
||||
|
||||
@@ -189,7 +189,7 @@ func (c Config) String(useAdmin bool) string {
|
||||
"port=" + strconv.Itoa(int(c.Port)),
|
||||
"user=" + user.Username,
|
||||
"dbname=" + c.Database,
|
||||
"application_name=zitadel",
|
||||
"application_name=" + dialect.DefaultAppName,
|
||||
"sslmode=" + user.SSL.Mode,
|
||||
}
|
||||
if c.Options != "" {
|
||||
|
||||
@@ -65,10 +65,8 @@ func CloseTransaction(tx Tx, err error) error {
|
||||
}
|
||||
|
||||
type Config struct {
|
||||
Dialects map[string]interface{} `mapstructure:",remain"`
|
||||
EventPushConnRatio float64
|
||||
ProjectionSpoolerConnRatio float64
|
||||
connector dialect.Connector
|
||||
Dialects map[string]interface{} `mapstructure:",remain"`
|
||||
connector dialect.Connector
|
||||
}
|
||||
|
||||
func (c *Config) SetConnector(connector dialect.Connector) {
|
||||
|
||||
@@ -26,7 +26,7 @@ type Matcher interface {
|
||||
}
|
||||
|
||||
const (
|
||||
defaultAppName = "zitadel"
|
||||
DefaultAppName = "zitadel"
|
||||
)
|
||||
|
||||
type Connector interface {
|
||||
|
||||
@@ -184,7 +184,7 @@ func (c Config) String(useAdmin bool) string {
|
||||
"host=" + c.Host,
|
||||
"port=" + strconv.Itoa(int(c.Port)),
|
||||
"user=" + user.Username,
|
||||
"application_name=zitadel",
|
||||
"application_name=" + dialect.DefaultAppName,
|
||||
"sslmode=" + user.SSL.Mode,
|
||||
}
|
||||
if c.Options != "" {
|
||||
|
||||
Reference in New Issue
Block a user