{"id":20994012,"url":"https://github.com/michelderu/dse-stargate","last_synced_at":"2026-07-18T17:05:35.574Z","repository":{"id":80119645,"uuid":"353730548","full_name":"michelderu/dse-stargate","owner":"michelderu","description":"DataStax Enterprise + Stargate API Gateway + Traefik to loadbalance multiple gateways","archived":false,"fork":false,"pushed_at":"2022-01-27T14:59:32.000Z","size":321,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-22T16:39:29.281Z","etag":null,"topics":["dse","stargate","traefik"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/michelderu.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-04-01T14:40:00.000Z","updated_at":"2022-01-26T20:36:21.000Z","dependencies_parsed_at":"2023-07-09T13:15:21.656Z","dependency_job_id":null,"html_url":"https://github.com/michelderu/dse-stargate","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/michelderu/dse-stargate","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michelderu%2Fdse-stargate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michelderu%2Fdse-stargate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michelderu%2Fdse-stargate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michelderu%2Fdse-stargate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/michelderu","download_url":"https://codeload.github.com/michelderu/dse-stargate/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michelderu%2Fdse-stargate/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35624339,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-18T02:00:07.223Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["dse","stargate","traefik"],"created_at":"2024-11-19T07:16:28.045Z","updated_at":"2026-07-18T17:05:35.548Z","avatar_url":"https://github.com/michelderu.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Scalable docker-compose with DSE and Stargate, loadbalanced by Traefik\nThis project aims to create a scalable (up and down) environment for DSE and Stargate.  \nDSE is globally accepted as the most reliable and scalable database delibering single-digit-millisecond performance.  \nStargate is a developer friendly gateway to DSE that offers REST, Document and GraphQL APIs.\n\nDSE (Storage) and Stargate (Compute) can be separately scaled up and down. Traefik is used to load balance any number Stargate instances.\n\n## Traefik host name\nTraefik will listen to the hostname `stargate.localhost` for loadbalancing Stargate requests. In order for this to work, you might need to extend your `/etc/hosts` file as follows:\n```\n##\n# Host Database\n#\n# localhost is used to configure the loopback interface\n# when the system is booting.  Do not change this entry.\n##\n127.0.0.1\tlocalhost\n127.0.0.1\tstargate.localhost\n```\n\n## Scripted startup\nThere is a script provided to startup the cluster.\n- `start-d1s2.sh` will start the cluster with 1 node of DSE, 2 nodes of Stargate and 1 node of Traefik\n\nDSE is configured with a maximum heap size of 4 GB. Stargate with a heapsize of 2 GB but will mostly use 1 GB.\n\nAfter startup `docker stats` will be started for insight in resource consumption.\n\n## Run cqlsh from the container\n```sh\ndocker exec -it dse-stargate-backend-1 cqlsh\n```\n# Guardrails\nIn DSE, Guardrails have been introduced to create configurable trip-wires in Cassandra that will either warn or error and block any operation that violates known anti-patterns. In DSE 6.8, DataStax is releasing the first set of Guardrails which include codified, best-practices such as:\n- Consistency levels allowed\n- Payload sizes\n- Column sizes\n- Collection sizes\n- Number of indices \n- Number of materialized views\n- And more\n\n## Configuration changes\nNormally the Cassandra config is located in `/opt/dse/resources/cassandra/conf/cassandra.yaml`. The DSE config is located in `/opt/dse/resources/dse/conf/dse.yaml`. Docker images provided by DataStax include a startup script that swaps DataStax Enterprise (DSE) configuration files found in the `/config` volume directory with the configuration file in the default location on the container. In this docker-compose set up, a volume mapping has been created that allows for local updates to the `cassandra.yaml` to be read by DSE running in the container.\n\nNow that we have control over the configuration, we can change settings such as *Guardrails*.\n\n## Test some guardrails\nChange the guardrails in `cassandra.yaml`:\n```yaml\n# Guardrails settings.\nguardrails:\n\n  # Warn threshold to warn creating more tables than threshold.\n  # Default -1 to disable, may differ if emulate_dbaas_defaults is enabled\n  tables_warn_threshold: 2\n\n  # Failure threshold to prevent creating more tables than threshold.\n  # Default -1 to disable, may differ if emulate_dbaas_defaults is enabled\n  tables_failure_threshold: 3\n```\nSave the file, stop the containers and start again. Then log in to cqlsh again.\n```sh\ndocker-compose down\n./start-d1s2.sh\ndocker exec -it dse-stargate_backend_1 cqlsh\n```\nNow let's create a table with the changes guardrail settings and see what happens:\n```sql\nCREATE KEYSPACE test WITH replication = {'class': 'SimpleStrategy', 'replication_factor': 1};\nUSE test;\nCREATE TABLE first_table (first_column text PRIMARY KEY, second_column text);\nCREATE TABLE second_table (first_column text PRIMARY KEY, second_column text);\nCREATE TABLE third_table (first_column text PRIMARY KEY, second_column text);\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmichelderu%2Fdse-stargate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmichelderu%2Fdse-stargate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmichelderu%2Fdse-stargate/lists"}