Vilsol
07/18/2023, 9:33 PMhttps://cdn.discordapp.com/attachments/844600078948630559/1130975757498318959/image.png▾
Vilsol
07/18/2023, 9:35 PMyaml
apiVersion: authzed.com/v1alpha1
kind: SpiceDBCluster
metadata:
name: spicedb-dev
spec:
channel: stable
version: v1.18.0
config:
logLevel: debug
datastoreEngine: cockroachdb
datastoreTxOverlapStrategy: insecure
replicas: 1
otelEndpoint: opentelemetry-collector.monitoring.svc:4317
otelInsecure: "true"
otelProvider: otlpgrpc
otelSampleRatio: "1"
secretName: dev-spicedb-configJoey
07/18/2023, 9:48 PMVilsol
07/18/2023, 9:59 PMJoey
07/18/2023, 10:00 PMJoey
07/18/2023, 10:00 PMJoey
07/18/2023, 10:01 PMJoey
07/18/2023, 10:01 PMVilsol
07/18/2023, 10:02 PMgithub.com/uptrace/opentelemetry-go-extraVilsol
07/18/2023, 10:03 PMvroldanbet
07/19/2023, 11:11 AMvroldanbet
07/19/2023, 11:16 AMvroldanbet
07/19/2023, 12:03 PMhttps://cdn.discordapp.com/attachments/1130975757737398382/1131194708564115566/image.png▾
vroldanbet
07/19/2023, 12:11 PMvroldanbet
07/19/2023, 12:12 PMVilsol
07/19/2023, 11:42 PMhttps://cdn.discordapp.com/attachments/1130975757737398382/1131370553140330628/image.png▾
Vilsol
07/19/2023, 11:45 PMJoey
07/19/2023, 11:45 PMJoey
07/19/2023, 11:45 PMJoey
07/19/2023, 11:46 PMVilsol
07/19/2023, 11:46 PMVilsol
07/19/2023, 11:47 PMvroldanbet
07/19/2023, 11:53 PMJoey
07/19/2023, 11:53 PMvroldanbet
07/19/2023, 11:54 PMJoey
07/19/2023, 11:54 PMvroldanbet
07/19/2023, 11:55 PMVilsol
07/20/2023, 12:05 AMadd-pgx-otel-tracing branch which I assume is as new as it can beJoey
07/20/2023, 12:07 AMJoey
07/20/2023, 12:07 AMJoey
07/20/2023, 12:07 AMVilsol
07/20/2023, 12:08 AMJoey
07/20/2023, 12:08 AMJoey
07/20/2023, 12:08 AMzed?Joey
07/20/2023, 12:08 AMVilsol
07/20/2023, 12:09 AMVilsol
07/20/2023, 12:09 AMgo
client, err := authzed.NewClient(
viper.GetString(configSpiceDBEndpoint),
grpc.WithTransportCredentials(insecure.NewCredentials()),
grpcutil.WithInsecureBearerToken(viper.GetString(configSpiceDBToken)),
grpc.WithUnaryInterceptor(otelgrpc.UnaryClientInterceptor()),
grpc.WithStreamInterceptor(otelgrpc.StreamClientInterceptor()),
)Joey
07/20/2023, 12:10 AMJoey
07/20/2023, 12:10 AMVilsol
07/20/2023, 12:10 AMJoey
07/20/2023, 12:10 AMJoey
07/20/2023, 12:11 AMVilsol
07/20/2023, 12:11 AMJoey
07/20/2023, 12:11 AMJoey
07/20/2023, 12:11 AMJoey
07/20/2023, 12:11 AMVilsol
07/20/2023, 12:11 AMJoey
07/20/2023, 12:11 AMVilsol
07/20/2023, 12:12 AMVilsol
07/20/2023, 12:13 AMJoey
07/20/2023, 12:14 AMJoey
07/20/2023, 12:14 AM--datastore-conn-pool-write-max-open int number of concurrent connections open in a remote datastore's connection pool (default 10)
--datastore-conn-pool-write-min-open int number of minimum concurrent connections open in a remote datastore's connection pool (default 10)Vilsol
07/20/2023, 12:56 AMJoey
07/20/2023, 1:06 AMJoey
07/20/2023, 1:07 AMJoey
07/20/2023, 1:07 AMVilsol
07/20/2023, 1:07 AMVilsol
07/20/2023, 1:07 AMVilsol
07/20/2023, 1:07 AMJoey
07/20/2023, 1:10 AMVilsol
07/20/2023, 1:13 AMVilsol
07/20/2023, 1:54 AMgo
endpoint := viper.GetString(configSpiceDBEndpoint)
options := []grpc.DialOption{grpc.WithTransportCredentials(insecure.NewCredentials()),
grpcutil.WithInsecureBearerToken(viper.GetString(configSpiceDBToken)),
grpc.WithUnaryInterceptor(otelgrpc.UnaryClientInterceptor()),
grpc.WithStreamInterceptor(otelgrpc.StreamClientInterceptor()),
}
clientPool := grpc2.NewClientPool(100, endpoint, options...)
client := &authzed.Client{
SchemaServiceClient: v1.NewSchemaServiceClient(clientPool),
PermissionsServiceClient: v1.NewPermissionsServiceClient(clientPool),
WatchServiceClient: v1.NewWatchServiceClient(clientPool),
}Vilsol
07/20/2023, 1:54 AMJoey
07/20/2023, 1:57 AMJoey
07/20/2023, 1:57 AMvroldanbet
08/24/2023, 4:05 PMvroldanbet
08/25/2023, 1:22 PMrelation_tuple table with locality REGIONAL BY ROW
- set the namespace_config table with locality GLOBAL
We obtained <20 p95 read and <30ms p95 writes
Again, I would like to emphasize that this setup does not address the new enemy problem, but maybe you are cool with that