{"id":20822310,"url":"https://github.com/potier97/apachebenchtest","last_synced_at":"2025-10-24T18:13:24.840Z","repository":{"id":234577792,"uuid":"789176125","full_name":"potier97/ApacheBenchTest","owner":"potier97","description":"Pruebas de carga usando ApacheBench","archived":false,"fork":false,"pushed_at":"2024-04-19T21:22:58.000Z","size":201,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-18T16:50:09.755Z","etag":null,"topics":["apachebench","cloud","pruebas-cargas-stress"],"latest_commit_sha":null,"homepage":"","language":"Python","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/potier97.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}},"created_at":"2024-04-19T21:22:16.000Z","updated_at":"2024-04-19T21:24:07.000Z","dependencies_parsed_at":"2024-04-19T22:27:50.586Z","dependency_job_id":"ba78d106-b8db-42bd-a844-5419beb6fe27","html_url":"https://github.com/potier97/ApacheBenchTest","commit_stats":null,"previous_names":["potier97/apachebenchtest"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/potier97%2FApacheBenchTest","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/potier97%2FApacheBenchTest/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/potier97%2FApacheBenchTest/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/potier97%2FApacheBenchTest/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/potier97","download_url":"https://codeload.github.com/potier97/ApacheBenchTest/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243169548,"owners_count":20247572,"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":["apachebench","cloud","pruebas-cargas-stress"],"created_at":"2024-11-17T22:14:36.859Z","updated_at":"2025-10-24T18:13:19.807Z","avatar_url":"https://github.com/potier97.png","language":"Python","readme":"# Tutorial API REST- Flask (cipher/decipher)\nAPI REST - Flask. Esta es una API básica que proporciona 2 endpoints, para cifrar y descifrar información utilizando el algoritmo RC4 utilizando en WEP. Esta aplicación está desarrollada para el curso de Desarrollo de Soluciones Cloud. \n\n# Ejecución \nPara ejecutar la aplicación siga las siguientes instrucciones: \n\n## Crear un nuevo ambiente virtual (WINDOWS)\n* ```$ python -m venv venv```\n* ```$ .\\venv\\Scripts\\activate```\n\n## Instalar las dependencias\n* ```$ pip install flask``` \n* ```$ pip install flask-restful```\n* ```$ pip install flask-marshmallow```\n\n## Configurar variables de entorno\n* ```$ export FLASK_APP=app.py```\n* ```$ export FLASK_DEBUG=1```\n* ```$ export FLASK_ENV=development```\n\n## Ejecutar\n* ```$ flask run -h 0.0.0.0```\n\n## Consumir los servicios\n* Utilice Postman (o una herramienta equivalente) para realizar solicitudes post a los endpoints disponibles. \n* Ruta Endpoint 1 [POST]: ```http://ip_servidor:5000/cipher```\n* Ruta Endpoint 2 [POST]: ```http://ip_servidor:5000/decipher```\n* Ambos Endpoints requieren un JSON con el siguiente formato:  \n```{\"message\" : \"Texto a Cifrar/Descifrar\", \"key\": \"llave para Cifrar/Descifrar\"}```\n\n## Pruebas de Carga (Básicas)\n### Instalar Apache Benchmark\n* ```$ sudo apt-get install apache2-utils```  \n### Crear archivos JSON\n* Crear un archivo JSON de ejemplo (En el repositorio encontrará un par de ejemplos disponibles):  \n```{\"message\" : \"Texto a Cifrar/Descifrar\", \"key\": \"llave para Cifrar/Descifrar\"}```\n### Ejecución del comando \n* ```$ ab -n 1000 -c 100 -p data-cifrar.json -T application/json -rk http://ip_servidor:5000/cipher```\n* ```$ ab -n 1000 -c 100 -p data-descifrar.json -T application/json -rk http://ip_servidor:5000/decipher```  \n\ndonde:\n* ```-k (keepAlive)```. Realizar múltiples solicitudes dentro de una sesión HTTP, funcionalidad de los navegadores por la naturaleza\n* ```-r (flag)```. Indica que la conexión (socket) no se cierra al recibir errores\n* ```-n (requests)```. Número total de solicitudes para ejecutar\n* ```-c (concurrency)```. Cantidad de conexiones concurrentes\n* ```-p (file.json)```. JSON que se envia en el cuerpo del request\n* ```-T application/json```. Especifica la estructura de datos del body\n* ```-e data.csv```. Guarda los resultados en un archivo CSV\n\n## Script de pruebas\n\n* ```$ sh script.sh```\n\ncontiene los comandos de prueba de carga para los endpoints de cifrado y descifrado.\n\n\n## HTOP\n\nInstalar htop\n* ```$  apk add htop```\n\nEjecutar htop\n* ```$ htop```\n \n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpotier97%2Fapachebenchtest","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpotier97%2Fapachebenchtest","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpotier97%2Fapachebenchtest/lists"}