{"id":28545106,"url":"https://github.com/pumukydev/url-shortener","last_synced_at":"2026-03-12T11:39:34.210Z","repository":{"id":261672853,"uuid":"884438673","full_name":"PumukyDev/url-shortener","owner":"PumukyDev","description":"Apache server deployment made with Vagrant +  Ansible, include a url-shortener and a server status page with grafana and prometheus","archived":false,"fork":false,"pushed_at":"2025-03-15T16:29:54.000Z","size":8611,"stargazers_count":3,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"v1","last_synced_at":"2025-06-09T23:06:37.676Z","etag":null,"topics":["apache","grafana","php","prometheus","web"],"latest_commit_sha":null,"homepage":"https://pumukydev.com/","language":"PHP","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/PumukyDev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","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":"2024-11-06T18:49:26.000Z","updated_at":"2025-03-15T19:12:08.000Z","dependencies_parsed_at":"2024-11-07T20:30:24.940Z","dependency_job_id":"62140629-d78b-49ae-9c16-0dd8b4723d95","html_url":"https://github.com/PumukyDev/url-shortener","commit_stats":null,"previous_names":["pumukydev/host-url-shortener","pumukydev/web-server","pumukydev/url-shortener"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/PumukyDev/url-shortener","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PumukyDev%2Furl-shortener","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PumukyDev%2Furl-shortener/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PumukyDev%2Furl-shortener/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PumukyDev%2Furl-shortener/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PumukyDev","download_url":"https://codeload.github.com/PumukyDev/url-shortener/tar.gz/refs/heads/v1","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PumukyDev%2Furl-shortener/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264001804,"owners_count":23542325,"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":["apache","grafana","php","prometheus","web"],"created_at":"2025-06-09T23:06:32.741Z","updated_at":"2026-03-12T11:39:34.169Z","avatar_url":"https://github.com/PumukyDev.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PumukyDev Web Server\n\nThis is my **self hosted web server**. At the moment it is hosted in my desktop computer with debian so **do not expect great availability** (In a few months it will be running 24/7 in a Raspberry Pi)\n\n## Features\n* Has a simple, but intuitive and usable User Interface.\n* URL shortener tool.\n* Status page.\n* logo.png for some tests.\n* Automatic provisioning made with Vagrant.\n* /admin and /status password protection.\n* Dynamic DNS configuration to autoconfigure my new home ip if it changes.\n\n## Status page with grafana\n\nCheck my server status in https://pumukydev.com/status/ . There, you can see many information about my server (time up, loads, conections, etc\n)\n![showing grafana](assets/images/grafana-example.jpg)\n\nIf you want more detailed information [click here](./config/monitoring/README.md)\n\n## URL Shortener in action...\n\nTry my own url shortener system in https://pumukydev.com/shortener/ . If you want short any link, just introduce it and you will get a shorter url for your video or page. There you can see an example:\n\n![showing url-shortener](assets/screencasts/url-shortener.gif)\n\nIf you want more detailed information [click here](./htdocs/shortener/README.md)\n\n## Getting started\n\n### Download\n\nYou can download the proyect with just one command:\n\n```bash\ngit clone https://github.com/PumukyDev/web-server.git\n```\n\n### Configuration\n\nAfter downloading the files you have to open your router ports for the machine's ip (default 192.168.1.202)\n\n![opening ports](assets/images/ports.jpg)\n\n\u003e [!WARNING]\n\u003e If your ip do not start with 192.168.1.X or it is in use, change the ip, just change the next line in the [Vagrantfile](Vagrantfile). You may also have to change the bridge connector (you can check it making a `ip a` in the terminal). If you have changed the ip, change it from the [hosts](./ansible/hosts) file too \n\n\n```ruby\ns.vm.network \"public_network\", ip: \"192.168.1.202\", bridge: \"enp4s0\"\n```\n\n```\n[server]\n192.168.1.202 \nansible_ssh_user=vagrant\nansible_ssh_private_key_file=~/.ssh/id_rsa\nansible_port=2222\n```\n\n\n\u003e [!IMPORTANT]\n\u003e If you don't have any ssh key, generate a new pair with `ssh-keygen -t rsa -b 4096`\n\nCreate a new .env file with your ionos api key, it is used to manage txt records [URL-shortener](./htdocs/shortener/README.md) and to configure the [Dynamic DNS](./config/dynamic-dns/README.md). Change \"pumukydev\" domain with your own domain\n\nIf you want to use HTTPS in you server, create a certs folder inside `config/apache2/` and paste your own ionos certification keys.\n\n\n### Starting the server\n\nTo start the server, just make:\n\n```bash\nmake up\n```\n\nTo destroy the vm, try:\n\n```bash\nmake clean\n```\n\nIf you don't know if you have ansible or vagrant, try:\n\n```bash\nmake validate\n```\n\n\n\n## Other\n\n\u003cdetails\u003e\n    \u003csummary style=\"font-size: 20px\"\u003e\u003cb\u003ePerformance tests\u003c/b\u003e\u003c/summary\u003e\u003cbr/\u003e\n\nThese tests are made with `ab`, which is a tool for benchmarking your Apache Hypertext Transfer Protocol (HTTP) server. It is designed to give you an impression of how  your  current  Apache installation  performs. This especially shows you how many requests per second your Apache installation is capable of serving.\n\n\n\u003cdetails\u003e\n    \u003csummary style=\"font-size: 17.5px\"\u003e\u003cb\u003eNormal tests\u003c/b\u003e\u003c/summary\u003e\u003cbr/\u003e\n\n### Parameters:\n\n* `-k` : Enable the HTTP KeepAlive  feature,  i.e.,  perform  multiple  requests within one HTTP session. Default is no KeepAlive.\n\n* `-c` (concurrency): Number of multiple requests to perform at a time Default is one request at a time.\n\n* `-n` (requests): Number of requests to perform for the benchmarking session. The default is to just perform a single request which usually leads  to  non-repre‐ sentative benchmarking results.\n\n\n\n### 100 users and 1000 requests\n\n\n\u003cdetails\u003e\n    \u003csummary\u003e\u003cb\u003eIndex page with SSL3 and TLS1.2\u003c/b\u003e\u003c/summary\u003e\u003cbr/\u003e\n\nExtra Parameters:\n\n* `-f` (protocol): Specify SSL/TLS protocol (SSL2, TLS1, TLS1.1, TLS1.2, TLS1.3 or ALL)\n\n\n```bash\nab -k -f SSL3 -c 100 -n 1000 https://pumukydev.com/\n```\n\n![performance image](assets/images/performance/100-1000-f-SSL3.jpg)\n\n\u003e [!NOTE]\n\u003e SSL3 is deprecated so apache use TLS1.3 automatically, so this test is made with TLS1.3 instead of SSL3 actually.\n\nThe test duration was **1.556 seconds**, during which all **1000 requests** were successfully completed with no failures. Out of those, **994 requests** reused connections, reducing overhead thanks to HTTP Keep-Alive.\n\nOn average, the server handled **642.57 requests per second**, with each individual request taking about **155.6 ms** to process. Considering all concurrent requests, the average request time dropped to **1.556 ms**. The server achieved a **transfer rate of 873.95 KB/s**, transferring a total of **1,392,731 bytes**, where **1,165,000 bytes** corresponded to the actual HTML content.\n\nConnection times were broken down into phases:\n\n* **Connection** was almost instantaneous, with a median of **0 ms**.  \n* **Processing** the requests took **7 ms** on average.  \n* **Waiting** time, the delay before receiving the first byte of the response, was also about **7 ms**.  \n\nThe final breakdown shows that **90% of the requests** were completed within **12 ms**, and **95% within 16 ms**. The **longest request** took **1369 ms** to complete.\n\n\n```bash\nab -k -f TLS1.2 -c 100 -n 1000 https://pumukydev.com/\n```\n\n![performance image](assets/images/performance/100-1000-f-TLS1.2.jpg)\n\nThe test duration was **0.366 seconds**, during which **1,000 requests** were completed with **0 failures**. All **1,000 requests** reused connections, reducing overhead thanks to HTTP Keep-Alive.\n\nOn average, the server handled **2,732.69 requests per second**, with each individual request taking about **36.594 ms** to process. Considering all concurrent requests, the average request time dropped to **0.366 ms**. The server achieved a **transfer rate of 2,094.96 KB/s**, transferring a total of **785,030 bytes**, where **534,000 bytes** corresponded to the actual HTML content.\n\nConnection times were broken down into phases:\n\n* **Connection** was very fast, with a median of **0 ms**.  \n* **Processing** the requests took **7 ms** on average.  \n* **Waiting** time, the delay before receiving the first byte of the response, was about **7 ms**.  \n\nThe final breakdown shows that **90% of the requests** were completed within **8 ms**, and **95% within 66 ms**. The **longest request** took **107 ms** to complete.\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n    \u003csummary\u003e\u003cb\u003eLogo.png image (1.1 MB)\u003c/b\u003e\u003c/summary\u003e\u003cbr/\u003e\n\n```bash\nab -k -c 100 -n 1000 https://pumukydev.com/logo.png\n```\n\n ![performance image](assets/images/performance/100-1000-logo.jpg)\n\nThe test duration was **96.792 seconds**, during which **1000 requests** were completed with **16 failures**. Out of those, **984 requests** reused connections, reducing overhead thanks to HTTP Keep-Alive.\n\nOn average, the server handled **10.33 requests per second**, with each individual request taking about **9679.21 ms** to process. Considering all concurrent requests, the average request time dropped to **96.792 ms**. The server achieved a **transfer rate of 11,683.82 KB/s**, transferring a total of **115,804,346 bytes**, where **115,768,822 bytes** corresponded to the actual HTML content.\n\nConnection times were broken down into phases:\n\n* **Connection** was almost instantaneous, with a median of **0 ms**.  \n* **Processing** the requests took **7894 ms** on average.  \n* **Waiting** time, the delay before receiving the first byte of the response, was about **26 ms**.  \n\nThe final breakdown shows that **90% of the requests** were completed within **18,958 ms**, and **95% within 22,151 ms**. The **longest request** took **30,668 ms** to complete.\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n    \u003csummary\u003e\u003cb\u003eAdmin page with authentication\u003c/b\u003e\u003c/summary\u003e\u003cbr/\u003e\n\nExtra Parameters:\n\n* `-A` (attribute): Add Basic WWW Authentication, the attributes are a colon separated username and password.\n\n```bash\nab -k -c 100 -n 1000 https://pumukydev.com/admin/\n```\n\n ![performance image](assets/images/performance/100-1000-admin.jpg)\n\nI will not explain this image in depth as I did not write the `-A` parameter in order to been authenticated. This was an example that the page authentication works perfectly as if you don't write the password, you can't get into the admin page.\n\n```bash\nab -k -c 100 -n 1000 -A admin:asir https://pumukydev.com/admin/\n```\n\n ![performance image](assets/images/performance/100-1000-A-admin.jpg)\n\nThe test duration was **0.731 seconds**, during which **1000 requests** were completed with **0 failures**. Out of those, **992 requests** reused connections, reducing overhead thanks to HTTP Keep-Alive.\n\nOn average, the server handled **1368.70 requests per second**, with each individual request taking about **73.062 ms** to process. Considering all concurrent requests, the average request time dropped to **0.731 ms**. The server achieved a **transfer rate of 1733.14 KB/s**, transferring a total of **12,966,655 bytes**, where **1,060,000 bytes** corresponded to the actual HTML content.\n\nConnection times were broken down into phases:\n\n* **Connection** was extremely fast, with a median of **0 ms**.  \n* **Processing** the requests took **6 ms** on average.  \n* **Waiting** time, the delay before receiving the first byte of the response, was also about **6 ms**.  \n\nThe final breakdown shows that **90% of the requests** were completed within **8 ms**, and **95% within **11 ms**. The **longest request** took **669 ms** to complete.\n\n\n\n\n\u003c/details\u003e\n\n\n\n\n### 1000 users and 10000 requests\n\n\u003cdetails\u003e\n    \u003csummary\u003e\u003cb\u003eIndex page with SSL3 and TLS1.2\u003c/b\u003e\u003c/summary\u003e\u003cbr/\u003e\n\n```bash\nab -k -f SSL3 -c 1000 -n 10000 https://pumukydev.com/\n```\n\n![performance image with custom header](assets/images/performance/1000-10000-f-SSL3.jpg)\n\n\u003e [!NOTE]\n\u003e SSL3 is deprecated so apache use TLS1.3 automatically, so this test is made with TLS1.3 instead of SSL3 actually.\n\nThe test duration was **4.450 seconds**, during which **10,000 requests** were completed with **0 failures**. Out of those, **9,914 requests** reused connections, reducing overhead thanks to HTTP Keep-Alive.\n\nOn average, the server handled **2247.25 requests per second**, with each individual request taking about **444.99 ms** to process. Considering all concurrent requests, the average request time dropped to **0.445 ms**. The server achieved a **transfer rate of 3056.23 KB/s**, transferring a total of **13,926,235 bytes**, where **11,650,000 bytes** corresponded to the actual HTML content.\n\nConnection times were broken down into phases:\n\n- **Connection** was almost instantaneous, with a median of **0 ms**.  \n- **Processing** the requests took **5 ms** on average.  \n- **Waiting** time, the delay before receiving the first byte of the response, was about **5 ms**.  \n\nThe final breakdown shows that **90% of the requests** were completed within **8 ms**, and **95% within 10 ms**. The **longest request** took **4403 ms** to complete.\n\n\n\n```bash\nab -k -f TLS1.2 -c 1000 -n 10000 https://pumukydev.com/\n```\n\n![performance image with custom header](assets/images/performance/1000-10000-f-TLS1.2.jpg)\n\nThe test duration was **3.324 seconds**, during which **10,000 requests** were completed with **0 failures**. Out of those, **9,913 requests** reused connections, reducing overhead thanks to HTTP Keep-Alive.\n\nOn average, the server handled **3,008.26 requests per second**, with each individual request taking about **332.418 ms** to process. Considering all concurrent requests, the average request time dropped to **0.332 ms**. The server achieved a **transfer rate of 4,091.16 KB/s**, transferring a total of **13,926,163 bytes**, where **11,650,000 bytes** corresponded to the actual HTML content.\n\nConnection times were broken down into phases:\n\n* **Connection** was efficient, with a median of **0 ms**.  \n* **Processing** the requests took **5 ms** on average.  \n* **Waiting** time, the delay before receiving the first byte of the response, was about **5 ms**.  \n\nThe final breakdown shows that **90% of the requests** were completed within **7 ms**, and **95% within 12 ms**. The **longest request** took **3,281 ms** to complete.\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n    \u003csummary\u003e\u003cb\u003eLogo.png image (1.1 MB)\u003c/b\u003e\u003c/summary\u003e\u003cbr/\u003e\n\n```bash\nab -k -c 1000 -n 10000 https://pumukydev.com/logo.png\n```\n\n![performance image with custom header](assets/images/performance/1000-10000-logo.jpg)\n\nThe test duration was **247.758 seconds**, during which **10,000 requests** were completed with **15,936 failures**. Out of those, **1,838 requests** reused connections, reducing overhead thanks to HTTP Keep-Alive.\n\nOn average, the server handled **40.36 requests per second**, with each individual request taking about **24,775.850 ms** to process. Considering all concurrent requests, the average request time dropped to **24.776 ms**. The server achieved a **transfer rate of 9171.53 KB/s**, transferring a total of **2,326,859,198 bytes**, where **2,326,089,130 bytes** corresponded to the actual HTML content.\n\nConnection times were broken down into phases:\n\n* **Connection** had a median of **0 ms**, with a mean of **2170 ms** and a maximum of **196,890 ms**.  \n* **Processing** the requests took **25588.7 ms** on average, with a median of **7 ms**.  \n* **Waiting** time, the delay before receiving the first byte of the response, was about **0 ms** on median, with a maximum of **7228 ms**.  \n\nThe final breakdown shows that **90% of the requests** were completed within **21,115 ms**, and **95% within 80,639 ms**. The **longest request** took **210,532 ms** to complete.\n\n ![performance image](assets/images/performance/error.jpg)\n\nIn the previous image we can see many errors and problems as after asking for the image so many times, we get The SSL handshake failed and SSL_shutdown errors indicate that the web server could not handle the number of concurrent SSL connections requested.\n\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n    \u003csummary\u003e\u003cb\u003eAdmin page with authentication\u003c/b\u003e\u003c/summary\u003e\u003cbr/\u003e\n\n```bash\nab -k -c 1000 -n 10000 -A admin:asir https://pumukydev.com/admin/\n```\n\n ![performance image with custom header](assets/images/performance/1000-10000-A-admin.jpg)\n\n**The test duration was 4.217 seconds**, during which **10,000 requests** were completed with **0 failures**. Out of those, **9,913 requests** reused connections, reducing overhead thanks to HTTP Keep-Alive.\n\nOn average, the server handled **2,371.32 requests per second**, with each individual request taking about **421.706 ms** to process. Considering all concurrent requests, the average request time dropped to **0.422 ms**. The server achieved a **transfer rate of 3,002.63 KB/s**, transferring a total of **12,966,172 bytes**, where **10,690,000 bytes** corresponded to the actual HTML content.\n\nConnection times were broken down into phases:\n\n- **Connection** was almost instantaneous, with a median of **0 ms**.  \n- **Processing** the requests took **6 ms** on average.  \n- **Waiting** time, the delay before receiving the first byte of the response, was about **2.6 ms**.  \n\nThe final breakdown shows that **90% of the requests** were completed within **7 ms**, and **95% within 8 ms**. The **longest request** took **4,159 ms** to complete.\n\n\n\u003c/details\u003e\n\n\u003cbr/\u003e\n\n---\n\n\u003cbr/\u003e\n\n\u003c/details\u003e\n\n\n\n\n\n\n\u003cdetails\u003e\n    \u003csummary style=\"font-size: 17.5px\"\u003e\u003cb\u003eCompression tests\u003c/b\u003e\u003c/summary\u003e\u003cbr/\u003e\n\n### Parameters:\n\n* `-k` : Enable the HTTP KeepAlive  feature,  i.e.,  perform  multiple  requests within one HTTP session. Default is no KeepAlive.\n\n* `-c` (concurrency): Number of multiple requests to perform at a time Default is one request at a time.\n\n* `-n` (requests): Number of requests to perform for the benchmarking session. The default is to just perform a single request which usually leads  to  non-repre‐ sentative benchmarking results.\n\n* `-H` (custom-header): Append extra headers to the request. The argument is typically  in  the form  of  a valid header line, containing a colon-separated field-value pair (i.e., \"Accept-Encoding: zip/zop;8bit\" or \"Accept-Encoding: gzip, deflate\")\n\n\n\n### 100 users and 1000 requests\n\n\u003cdetails\u003e\n    \u003csummary\u003e\u003cb\u003eIndex page with SSL3 and TLS1.2\u003c/b\u003e\u003c/summary\u003e\u003cbr/\u003e\n\n```bash\nab -k -f SSL3 -c 100 -n 1000 -H \"Accept-Encoding: gzip, deflate\" https://pumukydev.com/\n```\n\n\u003e [!NOTE]\n\u003e SSL3 is deprecated so apache use TLS1.3 automatically, so this test is made with TLS1.3 instead of SSL3 actually.\n\n![performance image](assets/images/performance/100-1000-f-SSL3-H.jpg)\n\n**The test duration was 0.830 seconds**, during which **1,000 requests** were completed with **0 failures**. Out of those, **993 requests** reused connections, reducing overhead thanks to HTTP Keep-Alive.\n\nOn average, the server handled **1,204.20 requests per second**, with each individual request taking about **83.042 ms** to process. Considering all concurrent requests, the average request time dropped to **0.830 ms**. The server achieved a **transfer rate of 922.77 KB/s**, transferring a total of **784,683 bytes**, where **534,000 bytes** corresponded to the actual HTML content.\n\nConnection times were broken down into phases:\n\n- **Connection** was almost instantaneous, with a median of **0 ms**.  \n- **Processing** the requests took **7 ms** on average.  \n- **Waiting** time, the delay before receiving the first byte of the response, was about **3.3 ms**.  \n\nThe final breakdown shows that **90% of the requests** were completed within **9 ms**, and **95% within 11 ms**. The **longest request** took **771 ms** to complete.\n\n\n```bash\nab -k -f TLS1.2 -c 100 -n 1000 -H \"Accept-Encoding: gzip, deflate\" https://pumukydev.com/\n```\n\n![performance image](assets/images/performance/100-1000-f-TLS1.2-H.jpg)\n\n\nThe test duration was **0.366 seconds**, during which **1,000 requests** were completed with **0 failures**. Out of those, **1,000 requests** reused connections, reducing overhead thanks to HTTP Keep-Alive.\n\nOn average, the server handled **2,732.69 requests per second**, with each individual request taking about **36.59 ms** to process. Considering all concurrent requests, the average request time dropped to **0.366 ms**. The server achieved a **transfer rate of 20,494.96 KB/s**, transferring a total of **785,030 bytes**, where **534,000 bytes** corresponded to the actual HTML content.\n\nConnection times were broken down into phases:\n\n* **Connection** was almost instantaneous, with a median of **0 ms**.  \n* **Processing** the requests took **7 ms** on average.  \n* **Waiting** time, the delay before receiving the first byte of the response, was about **7 ms**.  \n\nThe final breakdown shows that **90% of the requests** were completed within **8 ms**, and **95% within 66 ms**. The **longest request** took **107 ms** to complete.\n\n\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n    \u003csummary\u003e\u003cb\u003eLogo.png image (1.1 MB)\u003c/b\u003e\u003c/summary\u003e\u003cbr/\u003e\n\n```bash\nab -k -c 100 -n 1000 -H \"Accept-Encoding: gzip, deflate\" https://pumukydev.com/logo.png\n```\n\n ![performance image/logo.png](assets/images/performance/100-1000-H-logo.jpg)\n\n**The test duration was 107.399 seconds**, during which **1,000 requests** were completed with **79 failures**. The failures were due to **length mismatches**, with no connection or reception errors. Out of those, **921 requests** reused connections, reducing overhead thanks to HTTP Keep-Alive.\n\nOn average, the server handled **9.31 requests per second**, with each individual request taking about **10,739.898 ms** to process. Considering all concurrent requests, the average request time dropped to **107.399 ms**. The server achieved a **transfer rate of 9,959.35 KB/s**, transferring a total of **10,952,94563 bytes**, where **10,949,57883 bytes** corresponded to the actual HTML content.\n\nConnection times were broken down into phases:\n\n- **Connection** was nearly instantaneous, with a median of **0 ms**.  \n- **Processing** the requests took **9,685 ms** on average.  \n- **Waiting** time, the delay before receiving the first byte of the response, was about **31 ms**.  \n\nThe final breakdown shows that **90% of the requests** were completed within **17,391 ms**, and **95% within 19,622 ms**. The **longest request** took **34,029 ms** to complete.\n\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n    \u003csummary\u003e\u003cb\u003eAdmin page with authentication\u003c/b\u003e\u003c/summary\u003e\u003cbr/\u003e\n\n```bash\nab -k -c 100 -n 1000 -A admin:asir -H \"Accept-Encoding: gzip, deflate\" https://pumukydev.com/admin/\n```\n\n ![performance image/admin](assets/images/performance/100-1000-A-admin-H.jpg)\n\nThe test duration was **0.588 seconds**, during which **1000 requests** were completed with **0 failures**. Out of those, **1000 requests** reused connections, reducing overhead thanks to HTTP Keep-Alive.\n\nOn average, the server handled **1701.68 requests per second**, with each individual request taking about **58.765 ms** to process. Considering all concurrent requests, the average request time dropped to **0.588 ms**. The server achieved a **transfer rate of 1206.49 KB/s**, transferring a total of **720,016 bytes**, where **475,000 bytes** corresponded to the actual HTML content.\n\nConnection times were broken down into phases:\n\n* **Connection** was almost instantaneous, with a median of **0 ms**.  \n* **Processing** the requests took **8 ms** on average.  \n* **Waiting** time, the delay before receiving the first byte of the response, was about **8 ms**.  \n\nThe final breakdown shows that **99% of the requests** were completed within **67 ms**, and **100% within 129 ms**. The **longest request** took **129 ms** to complete.\n\n\n\u003c/details\u003e\n\n\n\n### 1000 users and 10000 requests\n\n\u003cdetails\u003e\n    \u003csummary\u003e\u003cb\u003eIndex page with SSL3 and TLS1.2\u003c/b\u003e\u003c/summary\u003e\u003cbr/\u003e\n\n```bash\nab -k -f SSL3 -c 1000 -n 10000 -H \"Accept-Encoding: gzip, deflate\" https://pumukydev.com/\n```\n\n\u003e [!NOTE]\n\u003e SSL3 is deprecated so apache use TLS1.3 automatically, so this test is made with TLS1.3 instead of SSL3 actually.\n\n![performance image with custom header](assets/images/performance/1000-10000-f-SSL3-H.jpg)\n\nThe test duration was **4.998 seconds**, during which **10,000 requests** were completed with **0 failures**. Out of those, **9,916 requests** reused connections, reducing overhead thanks to HTTP Keep-Alive.\n\nOn average, the server handled **2000.93 requests per second**, with each individual request taking about **499.768 ms** to process. Considering all concurrent requests, the average request time dropped to **0.500 ms**. The server achieved a **transfer rate of 1533.20 KB/s**, transferring a total of **7,846,338 bytes**, where **5,340,000 bytes** corresponded to the actual HTML content.\n\nConnection times were broken down into phases:\n\n* **Connection** was fast, with a median of **0 ms**.  \n* **Processing** the requests took **7 ms** on average.  \n* **Waiting** time, the delay before receiving the first byte of the response, was about **7 ms**.  \n\nThe final breakdown shows that **99% of the requests** were completed within **2050 ms**, and **100% within 4951 ms**. The **longest request** took **4951 ms** to complete.\n\n\n```bash\nab -k -f TLS1.2 -c 1000 -n 10000 -H \"Accept-Encoding: gzip, deflate\" https://pumukydev.com/\n```\n\n![performance image with custom header](assets/images/performance/1000-10000-f-TLS1.2-H.jpg)\n\nThe test duration was **2.600 seconds**, during which **10,000 requests** were completed with **0 failures**. Out of those, **9,916 requests** reused connections, reducing overhead thanks to HTTP Keep-Alive.\n\nOn average, the server handled **3,834.26 requests per second**, with each individual request taking about **260.81 ms** to process. Considering all concurrent requests, the average request time dropped to **0.261 ms**. The server achieved a **transfer rate of 2,937.97 KB/s**, transferring a total of **7,846,310 bytes**, where **5,340,000 bytes** corresponded to the actual HTML content.\n\nConnection times were broken down into phases:\n\n* **Connection** was almost instantaneous, with a median of **0 ms**.  \n* **Processing** the requests took **3 ms** on average.  \n* **Waiting** time, the delay before receiving the first byte of the response, was about **3 ms**.  \n\nThe final breakdown shows that **90% of the requests** were completed within **7 ms**, and **95% within 9 ms**. The **longest request** took **2,568 ms** to complete.\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n    \u003csummary\u003e\u003cb\u003eLogo.png image (1.1 MB)\u003c/b\u003e\u003c/summary\u003e\u003cbr/\u003e\n\n```bash\nab -k -c 1000 -n 10000 -H \"Accept-Encoding: gzip, deflate\" https://pumukydev.com/logo.png\n```\n\n ![performance image/logo.png with custom header](assets/images/performance/1000-10000-H-logo.jpg)\n\nThe test duration was **472.675 seconds**, during which **10,000 requests** were completed with **11,013 failures**. Out of those, **3,999 requests** reused connections, reducing overhead thanks to HTTP Keep-Alive.\n\nOn average, the server handled **21.16 requests per second**, with each individual request taking about **47,267.528 ms** to process. Considering all concurrent requests, the average request time dropped to **47.268 ms**. The server achieved a **transfer rate of 10,288.16 KB/s**, transferring a total of **4,979,669,405 bytes**, where **4,978,045,986 bytes** corresponded to the actual HTML content.\n\nConnection times were broken down into phases:\n\n* **Connection** took a median of **0 ms**, with an average of **7,905 ms**.  \n* **Processing** the requests took **35,743 ms** on average.  \n* **Waiting** time, the delay before receiving the first byte of the response, was about **230 ms**.  \n\nThe final breakdown shows that **90% of the requests** were completed within **95,571 ms**, and **100% within 429,719 ms**. The **longest request** took **429,719 ms** to complete.\n\n ![performance image/logo.png](assets/images/performance/error.jpg)\n\nIn the previous image we can see many errors and problems as after asking for the image so many times, we get The SSL handshake failed and SSL_shutdown errors indicate that the web server could not handle the number of concurrent SSL connections requested.\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n    \u003csummary\u003e\u003cb\u003eAdmin page with authentication\u003c/b\u003e\u003c/summary\u003e\u003cbr/\u003e\n\n```bash\nab -k -c 1000 -n 10000 -A admin:asir -H \"Accept-Encoding: gzip, deflate\" https://pumukydev.com/admin/\n```\n\n ![performance image/admin with custom header](assets/images/performance/1000-10000-A-admin-H.jpg)\n\nThe test duration was **5.838 seconds**, during which **10,000 requests** were completed with **0 failures**. Out of those, **9,990 requests** reused connections, reducing overhead thanks to HTTP Keep-Alive.\n\nOn average, the server handled **1,712.94 requests per second**, with each individual request taking about **583.793 ms** to process. Considering all concurrent requests, the average request time dropped to **0.584 ms**. The server achieved a **transfer rate of 1,213.78 KB/s**, transferring a total of **7,256,015 bytes**, where **4,750,000 bytes** corresponded to the actual HTML content.\n\nConnection times were broken down into phases:\n\n* **Connection** was nearly instantaneous, with a median of **0 ms**.  \n* **Processing** the requests took **8 ms** on average.  \n* **Waiting** time, the delay before receiving the first byte of the response, was about **8 ms**.  \n\nThe final breakdown shows that **90% of the requests** were completed within **9 ms**, and **95% within 9 ms**. The **longest request** took **5,803 ms** to complete.\n\n\u003c/details\u003e\n\n\u003cbr/\u003e\n\n---\n\n\u003cbr/\u003e\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n    \u003csummary style=\"font-size: 17.5px\"\u003e\u003cb\u003eConclusion\u003c/b\u003e\u003c/summary\u003e\u003cbr/\u003e\n\nOverall, the server has demonstrated excellent performance during the tests, completing all requests with consistent response times and no failures, except in specific scenarios. \n\nThe system successfully handled the majority of tests under different levels of load, maintaining high efficiency in data transfer and effectively utilizing Keep-Alive connections to reduce overhead. Additionally, the server performed exceptionally well when tested with the `-H` parameter for compression, showing its capability to optimize resource delivery under compressed headers.\n\nHowever, specific issues were identified in the image tests, particularly those involving **10,000 simultaneous requests**, where higher response times and a significant number of failures were observed. This behavior might indicate bottlenecks in handling static content or limitations in the server's configuration to handle high concurrency in these specific cases.\n\n\u003c/details\u003e\n\n\u003cbr/\u003e\n\n---\n\n\u003cbr/\u003e\n\n\n\u003c/details\u003e\n\n\n\n\n\n\n\n\n\n\u003cdetails\u003e\n    \u003csummary style=\"font-size: 20px\"\u003e\u003cb\u003eFile structure\u003c/b\u003e\u003c/summary\u003e\u003cbr/\u003e\n\n\nThis is the my proyect file structure:\n\n```\n.\n├── ansible\n│   ├── ansible.cfg\n│   ├── hosts\n│   └── playbooks\n│       ├── main.yml\n│       └── tasks\n│           ├── apache.yml\n│           ├── base_packages.yml\n│           ├── dyndns.yml\n│           └── monitoring.yml\n├── assets\n│   ├── images\n│   │   ├── grafana-example.jpg\n│   │   ├── performance\n│   │   │   ├── 1000-10000-A-admin-H.jpg\n│   │   │   ├── 1000-10000-A-admin.jpg\n│   │   │   ├── 1000-10000-f-SSL3-H.jpg\n│   │   │   ├── 1000-10000-f-SSL3.jpg\n│   │   │   ├── 1000-10000-f-TLS1.2-H.jpg\n│   │   │   ├── 1000-10000-f-TLS1.2.jpg\n│   │   │   ├── 1000-10000-H-logo.jpg\n│   │   │   ├── 1000-10000-logo.jpg\n│   │   │   ├── 100-1000-A-admin-H.jpg\n│   │   │   ├── 100-1000-A-admin.jpg\n│   │   │   ├── 100-1000-admin.jpg\n│   │   │   ├── 100-1000-f-SSL3-H.jpg\n│   │   │   ├── 100-1000-f-SSL3.jpg\n│   │   │   ├── 100-1000-f-TLS1.2-H.jpg\n│   │   │   ├── 100-1000-f-TLS1.2.jpg\n│   │   │   ├── 100-1000-H-logo.jpg\n│   │   │   ├── 100-1000-logo.jpg\n│   │   │   └── error.jpg\n│   │   └── ports.jpg\n│   └── screencasts\n│       └── url-shortener.gif\n├── config\n│   ├── apache2\n│   │   ├── apache2.conf\n│   │   ├── certs\n│   │   │   ├── intermediate\n│   │   │   │   ├── intermediate1.cer\n│   │   │   │   └── intermediate2.cer\n│   │   │   ├── _.pumukydev.com_private_key.key\n│   │   │   └── pumukydev.com_ssl_certificate.cer\n│   │   ├── .htpasswd\n│   │   └── sites-available\n│   │       └── pumukydev.conf\n│   ├── dynamic-dns\n│   │   ├── dyndns-cronjob\n│   │   ├── get_url\n│   │   │   ├── dyndns.sh\n│   │   │   └── .env\n│   │   └── README.md\n│   └── monitoring\n│       ├── grafana\n│       │   ├── dashboard.json\n│       │   ├── dashboard.yml\n│       │   ├── datasources.yml\n│       │   └── grafana.ini\n│       ├── images\n│       │   ├── grafana_change_passwd.jpg\n│       │   ├── grafana_connections.jpg\n│       │   ├── grafana_graph.jpg\n│       │   ├── grafana_login.jpg\n│       │   ├── grafana_prometheus.jpg\n│       │   ├── prometheus_add_source.jpg\n│       │   ├── prometheus_settings.jpg\n│       │   └── prometheus_succed.jpg\n│       ├── prometheus\n│       │   └── prometheus.yml\n│       └── README.md\n├── CONTRIBUTING.md\n├── .env\n├── .gitignore\n├── htdocs\n│   ├── admin\n│   │   └── index.php\n│   ├── errors\n│   │   ├── error404.php\n│   │   └── README.md\n│   ├── images\n│   │   └── favicon.png\n│   ├── includes\n│   │   ├── footer.php\n│   │   └── header.php\n│   ├── index.php\n│   ├── logo.png\n│   ├── shortener\n│   │   ├── .env\n│   │   ├── get_long_url.sh\n│   │   ├── get_txt.sh\n│   │   ├── get_zoneId.sh\n│   │   ├── index.php\n│   │   ├── post_txt.sh\n│   │   ├── README.md\n│   │   ├── redirect.php\n│   │   └── urlshortener.php\n│   ├── status\n│   │   └── index.php\n│   ├── style\n│   │   └── style.css\n│   └── tools\n│       └── index.php\n├── LICENSE\n├── makefile\n├── README.md\n└── Vagrantfile\n\n28 directories, 80 files\n```\n\u003c/details\u003e\n\n## License\n\nThis project is licensed under the **Apache License 2.0**. See the [LICENSE](LICENSE) file for details.\n\n## Contribute\n\nWant to contribute? There are multiple ways you can contribute to this project. Here are some ideas:\n\n* 📃 [Translate the web into multiple languages!](./CONTRIBUTING.md#translations)\n* 🐛 [Fix some easy issues](CONTRIBUTING.md#Reporting-Issues)\n* 💡 [Or check out some other issues](CONTRIBUTING.md#Reporting-Issues) (or translate them).\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpumukydev%2Furl-shortener","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpumukydev%2Furl-shortener","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpumukydev%2Furl-shortener/lists"}