{"id":16925135,"url":"https://github.com/hiroppy/dynamic-rendering-sample","last_synced_at":"2025-08-01T00:33:31.927Z","repository":{"id":66361377,"uuid":"291846911","full_name":"hiroppy/dynamic-rendering-sample","owner":"hiroppy","description":"This repo introduces how to realize dynamic rendering.","archived":false,"fork":false,"pushed_at":"2020-11-19T12:06:39.000Z","size":1448,"stargazers_count":9,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-25T21:56:05.894Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Dockerfile","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/hiroppy.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":"2020-08-31T23:29:31.000Z","updated_at":"2021-12-23T02:03:29.000Z","dependencies_parsed_at":"2023-02-22T12:46:19.147Z","dependency_job_id":null,"html_url":"https://github.com/hiroppy/dynamic-rendering-sample","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hiroppy%2Fdynamic-rendering-sample","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hiroppy%2Fdynamic-rendering-sample/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hiroppy%2Fdynamic-rendering-sample/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hiroppy%2Fdynamic-rendering-sample/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hiroppy","download_url":"https://codeload.github.com/hiroppy/dynamic-rendering-sample/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244719575,"owners_count":20498666,"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-10-13T20:08:53.980Z","updated_at":"2025-03-21T01:26:03.426Z","avatar_url":"https://github.com/hiroppy.png","language":"Dockerfile","funding_links":[],"categories":[],"sub_categories":[],"readme":"# A minimum sample of Dynamic Rendering\n\nThis project uses [rendertron](https://github.com/GoogleChrome/rendertron) for dynamic rendering. \n\n## Infrastructure\n\n![infra](./assets/infra.png)\n\n## Result\n\nWhen users access to this repo, this repo will return this html\n\n![res-users](./assets/res-users.png)\n\nbut when bots access the same url, this html will be this.\n\n![res-bots](./assets/res-bots.png)\n\nIt means if you use dynamic rendering, SEO will be safety and OGP will enable, even if you don't write Node.js code.\n\nAlso, this output is like this.\n\n![](./assets/output.png)\n\nThis code using d3.js is too huge but rendertron was able to render as SSR.\n\n![](./assets/network.png)\n\n### Performance \n\nThe rendertron server scales to 10 pods. Also, this example page is heavy because it uses d3.js. https://observablehq.com/@d3/hierarchical-edge-bundling\n\n#### For users\n\n```shell\nᐅ wrk -t12 -c20 -d30s http://127.0.0.1:8080\nRunning 30s test @ http://127.0.0.1:8080\n  12 threads and 20 connections\n  Thread Stats   Avg      Stdev     Max   +/- Stdev\n    Latency    11.32ms    4.49ms  83.83ms   72.04%\n    Req/Sec    88.59     20.75   333.00     71.62%\n  31842 requests in 30.10s, 30.06MB read\nRequests/sec:   1057.83\nTransfer/sec:      1.00MB\n```\n\n#### For bots\n\n```shell\nᐅ wrk -t12 -c30 -d30s --timeout 10 http://127.0.0.1:8080\nRunning 30s test @ http://127.0.0.1:8080\n  12 threads and 30 connections\n  Thread Stats   Avg      Stdev     Max   +/- Stdev\n    Latency     8.86s     1.19s    9.91s    90.00%\n    Req/Sec     0.54      1.95    10.00     95.83%\n  48 requests in 30.08s, 22.12MB read\n  Socket errors: connect 0, read 0, write 0, timeout 38\nRequests/sec:      1.60\nTransfer/sec:    753.06KB\n```\n\n```shell\nᐅ wrk -t12 -c15 -d30s --timeout 10 http://127.0.0.1:8080\nRunning 30s test @ http://127.0.0.1:8080\n  12 threads and 15 connections  Thread Stats   Avg      Stdev     Max   +/- Stdevbind: address already in\n    Latency     6.36s     1.09s    9.44s    79.17%\n    Req/Sec     0.00      0.00     0.00    100.00%\n  49 requests in 30.10s, 22.58MB read\n  Socket errors: connect 0, read 0, write 0, timeout 1\nRequests/sec:      1.63\nTransfer/sec:    768.12KB\n```\n\nwith chorme options to improve performance\n\n```shell\nᐅ wrk -t12 -c30 -d30s --timeout 10 http://127.0.0.1:8080\nRunning 30s test @ http://127.0.0.1:8080\n  12 threads and 30 connections\n  Thread Stats   Avg      Stdev     Max   +/- Stdev\n    Latency     7.82s     1.23s    9.80s    57.14%\n    Req/Sec     0.45      1.88    10.00     96.08%\n  51 requests in 30.06s, 23.04MB read\n  Socket errors: connect 0, read 0, write 0, timeout 30\nRequests/sec:      1.70\nTransfer/sec:    784.83KB\n```\n\n```shell\nᐅ wrk -t12 -c15 -d30s --timeout 10 http://127.0.0.1:8080\nRunning 30s test @ http://127.0.0.1:8080\n  12 threads and 15 connections\n  Thread Stats   Avg      Stdev     Max   +/- Stdev\n    Latency     4.85s     1.57s    9.13s    80.00%\n    Req/Sec     0.00      0.00     0.00    100.00%\n  65 requests in 30.10s, 29.95MB read\nRequests/sec:      2.16\nTransfer/sec:      0.99MB\n```\n\n## Debug\n\n```sh\n$ git clone git@github.com:hiroppy/dynamic-rendering-sample.git\n$ cd dynamic-rendering-sample\n$ docker-compose up --build\n$ open http://localhost:8080\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhiroppy%2Fdynamic-rendering-sample","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhiroppy%2Fdynamic-rendering-sample","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhiroppy%2Fdynamic-rendering-sample/lists"}