{"id":20738803,"url":"https://github.com/ebean-orm/ebean-k8scache","last_synced_at":"2025-03-11T11:33:01.584Z","repository":{"id":46351502,"uuid":"113539056","full_name":"ebean-orm/ebean-k8scache","owner":"ebean-orm","description":"L2 Cache support running in Kubernetes","archived":false,"fork":false,"pushed_at":"2022-05-02T20:46:38.000Z","size":64,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-01-18T01:32:20.134Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ebean-orm.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-12-08T06:15:35.000Z","updated_at":"2021-10-25T23:43:39.000Z","dependencies_parsed_at":"2022-08-29T22:40:10.943Z","dependency_job_id":null,"html_url":"https://github.com/ebean-orm/ebean-k8scache","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ebean-orm%2Febean-k8scache","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ebean-orm%2Febean-k8scache/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ebean-orm%2Febean-k8scache/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ebean-orm%2Febean-k8scache/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ebean-orm","download_url":"https://codeload.github.com/ebean-orm/ebean-k8scache/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243025113,"owners_count":20223735,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-17T06:20:43.688Z","updated_at":"2025-03-11T11:33:01.549Z","avatar_url":"https://github.com/ebean-orm.png","language":"Java","readme":"# ebean-k8scache\nL2 Cache support running in Kubernetes\n\n\n## Steps \n\n1. Add ebean-k8scache as a dependency\n2. Configure the kubernetes service name and port\n\n### Example configuration\n\n```yaml\nebean:\n  cluster:\n    active: true\n    serviceName: my-service\n    namespace: my-namespace\n    podName: ${POD_NAME}\n    port: 9911\n```\n\nThe above means that ebean-k8scache will discover all the pods for\n`my-service` and join them as a cluster using port 9911.\n\n**Note:** To discovery process succeed the k8s ServiceAccount must have access to request api \n`/api/v1/namespaces/${namespace}/endpoints/${serviceName}` and the Pod must expose the `POD_NAME` system variable to the container.  \n\nAll the pods will run a L2 Cache and cache invalidation messages will\nbe propagated to all the pods in the cluster as needed.\n\n## Configuration\n\nAs an example of configuration via code:\n\n```java\n\nContainerConfig container = new ContainerConfig();\ncontainer.setActive(true);\ncontainer.setPort(9911);\ncontainer.setServiceName(\"my-service\");\ncontainer.setNamespace(\"my-namespace\");\nconfig.setPodName(System.getenv(\"POD_NAME\"));\n\n// On the ServerConfig of the default Server\n// set the ContainerConfig\nServerConfig serverConfig = new ServerConfig();\nserverConfig.setContainerConfig(container);\n\n\n// When the container of the default starts it will discover\n// the other pods and join them as a cluster \nEbeanServer defaultServer = EbeanServerFactory.create(serverConfig);\n\n``` \n\n## Runtime membership checking\n\nPeriodically the membership of the cluster is checked. By default this is done every\nminute and back off to every 5 minutes. \n\n\n## Logging\n\nSet logging on `io.ebean.cluster.K8s` to DEBUG or TRACE for this plugin.\n\nSet logging on `io.ebean.cache` to DEBUG or TRACE to view L2 cache activity \nsuch as GETs, PUTs etc.  \n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Febean-orm%2Febean-k8scache","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Febean-orm%2Febean-k8scache","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Febean-orm%2Febean-k8scache/lists"}