Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for memcaches #564

Merged
merged 3 commits into from
May 14, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

345 changes: 211 additions & 134 deletions pkg/logproto/logproto.pb.go

Large diffs are not rendered by default.

38 changes: 38 additions & 0 deletions production/ksonnet/loki/config.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,44 @@
gcs: {
bucket_name: $._config.gcs_bucket_name,
},

index_queries_cache_config: {
memcached: {
batch_size: 100,
parallelism: 100,
},

memcached_client: {
host: 'memcached-index-queries.%s.svc.cluster.local' % $._config.namespace,
service: 'memcached-client',
},
},
},

chunk_store_config: {
chunk_cache_config: {
memcached: {
batch_size: 100,
parallelism: 100,
},

memcached_client: {
host: 'memcached.%s.svc.cluster.local' % $._config.namespace,
service: 'memcached-client',
},
},

write_dedupe_cache_config: {
memcached: {
batch_size: 100,
parallelism: 100,
},

memcached_client: {
host: 'memcached-index-writes.%s.svc.cluster.local' % $._config.namespace,
service: 'memcached-client',
},
},
},

schema_config: {
Expand Down
10 changes: 10 additions & 0 deletions production/ksonnet/loki/jsonnetfile.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,16 @@
}
},
"version": "master"
},
{
"name": "memcached",
"source": {
"git": {
"remote": "https://github.com/grafana/jsonnet-libs",
"subdir": "memcached"
}
},
"version": "master"
}
]
}
7 changes: 5 additions & 2 deletions production/ksonnet/loki/loki.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,11 @@
(import 'config.libsonnet') +
(import 'consul/consul.libsonnet') +

// Cortex services
// Loki services
(import 'distributor.libsonnet') +
(import 'ingester.libsonnet') +
(import 'querier.libsonnet') +
(import 'table-manager.libsonnet')
(import 'table-manager.libsonnet') +

// Supporting services
(import 'memcached.libsonnet')
21 changes: 21 additions & 0 deletions production/ksonnet/loki/memcached.libsonnet
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
local memcached = 'memcached/memcached.libsonnet';

memcached {
// Memcached instance used to cache chunks.
memcached_chunks: $.memcached {
name: 'memcached',
max_item_size: '2m',
memory_limit_mb: 4096,
},

// Dedicated memcached instance used to temporarily cache index lookups.
memcached_index_queries: $.memcached {
name: 'memcached-index-queries',
max_item_size: '5m',
},

// Dedicated memcached instance used to dedupe writes to the index.
memcached_index_writes: $.memcached {
name: 'memcached-index-writes',
},
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

60 changes: 30 additions & 30 deletions vendor/github.com/cortexproject/cortex/pkg/chunk/cache/cache.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading