{"id":23799878,"url":"https://github.com/martishin/springfluxvsmvc","last_synced_at":"2025-10-08T03:38:21.404Z","repository":{"id":204010439,"uuid":"710889934","full_name":"martishin/SpringFluxVsMVC","owner":"martishin","description":"Spring Flux vs MVC concurrency models comparison","archived":false,"fork":false,"pushed_at":"2024-01-09T12:02:44.000Z","size":81,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-01T21:28:13.233Z","etag":null,"topics":["coroutines","gradle","gradle-multi-project","kotlin","spring-boot","spring-mvc","spring-webflux","virtual-threads"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","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/martishin.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}},"created_at":"2023-10-27T16:52:09.000Z","updated_at":"2024-01-09T12:04:34.000Z","dependencies_parsed_at":"2024-01-25T22:26:59.243Z","dependency_job_id":"395fc68d-b429-4cbb-bfaf-9e9c4824f31b","html_url":"https://github.com/martishin/SpringFluxVsMVC","commit_stats":null,"previous_names":["ttymonkey/springfluxvsmvc","tty-monkey/springfluxvsmvc","data-tinker/springfluxvsmvc","martishin/springfluxvsmvc"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/martishin%2FSpringFluxVsMVC","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/martishin%2FSpringFluxVsMVC/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/martishin%2FSpringFluxVsMVC/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/martishin%2FSpringFluxVsMVC/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/martishin","download_url":"https://codeload.github.com/martishin/SpringFluxVsMVC/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240041036,"owners_count":19738653,"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":["coroutines","gradle","gradle-multi-project","kotlin","spring-boot","spring-mvc","spring-webflux","virtual-threads"],"created_at":"2025-01-01T21:27:52.345Z","updated_at":"2025-10-08T03:38:16.360Z","avatar_url":"https://github.com/martishin.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Description\nThis project consists of Spring MVC and Flux services and can be used to showcase the limitations of thread-per-request model.  \nBoth services return random numbers, with a 2 seconds delay to simulate request processing.  \nIn addition, this project shows how to set up Gradle multi-project build.  \n\n## How to Run\n1. Run the MVC service: `./gradlew :mvc:bootRun`\n2. Make 1000 concurrent requests to the MVC service: `artillery quick --count 1000 -n 1 http://localhost:8090/api/random`\n3. Run the Flux service: `./gradlew :flux:bootRun`\n4. Make 1000 concurrent requests to the Flux service: `artillery quick --count 1000 -n 1 http://localhost:8091/api/random`\n5. Run the MVC with virtual threads service: `./gradlew :mvc-virtual:bootRun`\n4. Make 1000 concurrent requests to the MVC with virtual threads service: `artillery quick --count 1000 -n 1 http://localhost:8092/api/random`\n\n## Results and Conclusions\nThe p99 response time for the MVC service should be around 10 seconds, but for the Flux service this value would be around 2 seconds.  \nThis situation happens because of thread starvation, MVC service runs out of available threads in the thread pool.  \nFlux service on the other hand doesn't have this issue, since it uses an event loop for requests processing.  \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmartishin%2Fspringfluxvsmvc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmartishin%2Fspringfluxvsmvc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmartishin%2Fspringfluxvsmvc/lists"}