{"id":22610904,"url":"https://github.com/sshehrozali/daffodil","last_synced_at":"2026-02-09T16:08:20.551Z","repository":{"id":59298111,"uuid":"535559702","full_name":"sshehrozali/daffodil","owner":"sshehrozali","description":"Distributed systems example in Spring framework using Load Balancer, API Gateway, Service Discovery and Distributed tracing.","archived":false,"fork":false,"pushed_at":"2022-09-28T10:43:22.000Z","size":858,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-11T08:26:37.206Z","etag":null,"topics":["distributed-computing","distributed-log","docker","eureka","http","load-balancing","microservices","service-disovery","spring","spring-boot","zipkin-sleuth"],"latest_commit_sha":null,"homepage":"","language":"Java","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/sshehrozali.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}},"created_at":"2022-09-12T07:40:42.000Z","updated_at":"2024-09-26T11:09:40.000Z","dependencies_parsed_at":"2023-01-18T20:27:23.848Z","dependency_job_id":null,"html_url":"https://github.com/sshehrozali/daffodil","commit_stats":null,"previous_names":["sshehrozali/daffodil"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/sshehrozali/daffodil","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sshehrozali%2Fdaffodil","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sshehrozali%2Fdaffodil/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sshehrozali%2Fdaffodil/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sshehrozali%2Fdaffodil/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sshehrozali","download_url":"https://codeload.github.com/sshehrozali/daffodil/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sshehrozali%2Fdaffodil/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29271900,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-09T13:47:44.167Z","status":"ssl_error","status_checked_at":"2026-02-09T13:47:43.721Z","response_time":56,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["distributed-computing","distributed-log","docker","eureka","http","load-balancing","microservices","service-disovery","spring","spring-boot","zipkin-sleuth"],"created_at":"2024-12-08T16:08:28.085Z","updated_at":"2026-02-09T16:08:20.534Z","avatar_url":"https://github.com/sshehrozali.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"### High-level Overview\n![](misc/distributed-system-design.png)\n### Microservices\n* **Customer:** The goal of this microservice is to handle all Customer registration requests.\n* **Fraud:** The goal of this microservice is to handle and perform all fraud checks i.e. if a customer is fraudulent or not.\n* **Notification:** The goal of this microservice is to send an async notification to user's smartphone or any other device when the user has registered successfully via third-party providers like Firebase or Twilio.\n\n### API Gateway\n`api-gateway` microservice uses `spring-cloud-starter-gateway` dependency to mark this service as API Gateway microservice. `APIGatewayApplication` class is annotated with `@EnableDiscoveryClient` to tell Spring that it will use Eureka Service Discovery to get complete URIs of running instances. The `application.yml` file contains Routes of other microservices.\n![](misc/api-gateway-design.png)\n\n### Service Discovery\n`eureka-server` uses `spring-cloud-starter-netflix-eureka-server` to register instance as server while other microservices `customer`, `fraud` uses `spring-cloud-starter-netflix-eureka-client` to register themselves as clients.\n\n#### Load Balancing\nThe `customer` microservice uses round-robin DNS load balancing algorithm to perform routing to x instance of `fraud` microservice. `CustomerConfig` class contains `restTemplate()` method which is annotated with `@LoadBalanced` to perform load balancing.\n\n#### Eureka Server connection pool\n![](misc/eureka-server.png)\n\n### Distributed Tracing\n#### Zipkin \u0026 Sleuth\n\u003cimg src=\"misc/zipkin-logo.png\" alt=\"drawing\" width=\"100\"/\u003e\n\u0026nbsp; \u003cimg src=\"misc/spring-cloud-sleuth.png\" alt=\"drawing\" width=\"100\"/\u003e\n\nUses `spring-cloud-starter-sleuth` and `spring-cloud-sleuth-zipkin` across all microservices. Zipkin server runs via a Java jar on same machine. Zipkin can also be configured inside `docker-compose.yml` to run in Docker container. The default port of Zipkin server is `9411`.\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsshehrozali%2Fdaffodil","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsshehrozali%2Fdaffodil","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsshehrozali%2Fdaffodil/lists"}