-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathadvanced-property-sharding.yaml
More file actions
156 lines (133 loc) · 4.56 KB
/
advanced-property-sharding.yaml
File metadata and controls
156 lines (133 loc) · 4.56 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
# Advanced Property Sharding Example
# This example demonstrates production-ready property sharding configuration
# with high-performance resource allocation, TLS, and comprehensive monitoring
#
# PRODUCTION REQUIREMENTS:
# - 3+ servers for HA graph shard primaries (5+ for larger datasets)
# - 16-20GB memory per server for high performance
# - 4+ CPU cores per server for concurrent cross-shard queries
# - High-speed, low-latency networking (10Gbps+)
# - TLS encryption for security
# - Comprehensive monitoring
# Prerequisites: Create admin secret (REQUIRED)
# kubectl create secret generic neo4j-admin-secret \
# --from-literal=username=neo4j \
# --from-literal=password=production-secure-password
# Property sharding enabled cluster with production-grade configuration
apiVersion: neo4j.neo4j.com/v1alpha1
kind: Neo4jEnterpriseCluster
metadata:
name: production-sharding-cluster
namespace: default
labels:
environment: production
feature: property-sharding
spec:
# Latest Neo4j version for best property sharding support
image:
repo: neo4j
tag: "2025.12.0-enterprise"
# Authentication required for property sharding
auth:
adminSecret: neo4j-admin-secret
# Production cluster sizing (3+ servers for HA; 5+ for larger datasets)
topology:
servers: 5 # 3+ recommended for HA, consider 7 for larger datasets
storage:
size: 100Gi
className: fast-ssd # High-performance storage class
# High-performance resource allocation (minimum 4GB, this is for large datasets)
resources:
requests:
memory: 16Gi # High-performance allocation for large datasets
cpu: 4000m # 4+ cores for optimal cross-shard performance
limits:
memory: 20Gi # Maximum performance for enterprise workloads
cpu: 6000m # Additional CPU for high-throughput shard coordination
# Property sharding with performance tuning
propertySharding:
enabled: true
config:
# Required settings (applied automatically)
internal.dbms.sharded_property_database.enabled: "true"
db.query.default_language: "CYPHER_25"
internal.dbms.sharded_property_database.allow_external_shard_access: "false"
# Performance tuning
db.tx_log.rotation.retention_policy: "14 days" # Longer retention for large datasets
internal.dbms.sharded_property_database.property_pull_interval: "5ms" # Faster sync
# Memory optimization
server.memory.heap.max_size: "12G"
server.memory.pagecache.size: "6G"
# Connection pooling
server.bolt.thread_pool_min_size: "10"
server.bolt.thread_pool_max_size: "100"
# TLS configuration for production
tls:
mode: cert-manager
issuerRef:
name: ca-cluster-issuer
kind: ClusterIssuer
---
# Production sharded database with sophisticated property distribution
apiVersion: neo4j.neo4j.com/v1alpha1
kind: Neo4jShardedDatabase
metadata:
name: ecommerce-sharded-db
namespace: default
labels:
application: ecommerce
database-type: sharded
spec:
clusterRef: production-sharding-cluster
# E-commerce product database
name: ecommerce
defaultCypherLanguage: "25"
propertySharding:
# Optimal shard count for large dataset
propertyShards: 8
# High-availability graph shard (critical path)
graphShard:
primaries: 3 # Raft consensus with fault tolerance
secondaries: 2 # Read replicas
# Fault-tolerant property shards
propertyShardTopology:
replicas: 2 # Redundant replicas
# Advanced property sharding configuration
config:
# Hash ring configuration
internal.dbms.sharded_property_database.hash_ring_size: "1024"
# Replication settings
internal.dbms.sharded_property_database.replication_factor: "2"
# Performance tuning
internal.dbms.sharded_property_database.batch_size: "1000"
internal.dbms.sharded_property_database.flush_interval: "1s"
# Seed from backups (shard-suffixed artifacts required in the bucket)
seedURI: "s3://ecommerce-backups/sharded/"
seedConfig:
config:
region: "us-east-1"
seedCredentials:
secretRef: "s3-credentials"
---
# Secret for seed URI access
apiVersion: v1
kind: Secret
metadata:
name: s3-credentials
namespace: default
type: Opaque
data:
# Base64 encoded credentials
access-key-id: <base64-encoded-access-key>
secret-access-key: <base64-encoded-secret-key>
---
# Admin secret for Neo4j authentication
apiVersion: v1
kind: Secret
metadata:
name: neo4j-admin-secret
namespace: default
type: Opaque
data:
username: bmVvNGo= # neo4j
password: cHJvZHVjdGlvbjEyMw== # production123