{"action":"created","comment":{"url":"https://api.github.com/repos/heroku/12factor/pulls/comments/47544320","id":47544320,"diff_hunk":"@@ -0,0 +1,12 @@\n+## IX. Disponibilidad\n+### Hacer el sistema más robusto intentando conseguir inicios rápidos y finalizaciones seguras\n+\n+**Los [procesos](./processes) de las aplicaciones \"twelve-factor\" están *disponibles*, lo que significa que pueden iniciarse o finalizarse en el momento que sea necesario.** Esto permite un escalado rápido y flexible, un despliegue rápido del [código](./codebase) y de los cambios de las [configuraciones](./config), y despliegues más robustos en producción.\n+\n+Los procesos deberían intentar conseguir **minimizar el tiempo de arranque**. En el mejor de los casos, un proceso necesita unos pocos segundos desde que se ejecuta el mandato hasta que arranca y está preparado para recibir peticiones o trabajos. Mejorar el tiempo de arranque proporciona mayor agilidad en el proceso de [distribución](./build-release-run) y escalado; y lo hace más robusto, porque el gestor de procesos puede mover procesos de forma segura entre máquinas físicas más fácilmente.\n+\n+Los procesos **se paran de manera segura cuando reciben una señal [SIGTERM](http://en.wikipedia.org/wiki/SIGTERM)** desde el gestor de procesos. Un proceso web para de manera segura cuando deja de escuchar el puerto asociado al servicio (así rechaza cualquier nueva petición), permitiendo que cualquier petición termine de procesarse y pueda finalizar sin problemas. Implícitamente, según este modelo, las peticiones HTTP son breves (no duran más de unos pocos segundos), y en el caso de un sondeo largo, el cliente debería intentar reconectar una y otra vez cuando se pierda la conexión.\n+\n+Para un trabajador (o \"worker\") finalizar de manera segura se consigue devolviendo el trabajo actual a una cola de trabajos. Por ejemplo, en [RabbitMQ](http://www.rabbitmq.com/) un trabajador puede mandar un [`NACK`](http://www.rabbitmq.com/amqp-0-9-1-quickref.html#basic.nack); en [Beanstalkd](http://kr.github.com/beanstalkd/), el trabajo se devuelve a una cola automáticamente en el momento en el que el trabajador finaliza. Los sistemas de exclusión mutua como [Delayed Job](https://github.com/collectiveidea/delayed_job#readme) necesitan estar seguros para liberar su candado en el registro de trabajos. Implícitamente, según este modelo, todos los trabajos son [reentrantes](https://es.wikipedia.org/wiki/Reentrancia_%28inform%C3%A1tica%29), lo que se consigue normalmente generando los resultados de manera transaccional, o convirtiendo la operación en [idempotente](http://es.wikipedia.org/wiki/Idempotencia).","path":"content/es/disposability.md","position":10,"original_position":10,"commit_id":"cd9b3d9f344d5f7edbcc91472526bc7d5236e353","original_commit_id":"cd9b3d9f344d5f7edbcc91472526bc7d5236e353","user":{"login":"sblancov","id":4477786,"avatar_url":"https://avatars.githubusercontent.com/u/4477786?v=3","gravatar_id":"","url":"https://api.github.com/users/sblancov","html_url":"https://github.com/sblancov","followers_url":"https://api.github.com/users/sblancov/followers","following_url":"https://api.github.com/users/sblancov/following{/other_user}","gists_url":"https://api.github.com/users/sblancov/gists{/gist_id}","starred_url":"https://api.github.com/users/sblancov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sblancov/subscriptions","organizations_url":"https://api.github.com/users/sblancov/orgs","repos_url":"https://api.github.com/users/sblancov/repos","events_url":"https://api.github.com/users/sblancov/events{/privacy}","received_events_url":"https://api.github.com/users/sblancov/received_events","type":"User","site_admin":false},"body":"Corregido por:\r\n\"Para finalizar de manera segura, un trabajador (o \"worker\") debe devolver el trabajo actual a una cola de trabajos.\"","created_at":"2015-12-14T19:24:19Z","updated_at":"2015-12-14T19:24:19Z","html_url":"https://github.com/heroku/12factor/pull/57#discussion_r47544320","pull_request_url":"https://api.github.com/repos/heroku/12factor/pulls/57","_links":{"self":{"href":"https://api.github.com/repos/heroku/12factor/pulls/comments/47544320"},"html":{"href":"https://github.com/heroku/12factor/pull/57#discussion_r47544320"},"pull_request":{"href":"https://api.github.com/repos/heroku/12factor/pulls/57"}}},"pull_request":{"url":"https://api.github.com/repos/heroku/12factor/pulls/57","id":52701157,"html_url":"https://github.com/heroku/12factor/pull/57","diff_url":"https://github.com/heroku/12factor/pull/57.diff","patch_url":"https://github.com/heroku/12factor/pull/57.patch","issue_url":"https://api.github.com/repos/heroku/12factor/issues/57","number":57,"state":"open","locked":false,"title":"Spanish translation","user":{"login":"sblancov","id":4477786,"avatar_url":"https://avatars.githubusercontent.com/u/4477786?v=3","gravatar_id":"","url":"https://api.github.com/users/sblancov","html_url":"https://github.com/sblancov","followers_url":"https://api.github.com/users/sblancov/followers","following_url":"https://api.github.com/users/sblancov/following{/other_user}","gists_url":"https://api.github.com/users/sblancov/gists{/gist_id}","starred_url":"https://api.github.com/users/sblancov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sblancov/subscriptions","organizations_url":"https://api.github.com/users/sblancov/orgs","repos_url":"https://api.github.com/users/sblancov/repos","events_url":"https://api.github.com/users/sblancov/events{/privacy}","received_events_url":"https://api.github.com/users/sblancov/received_events","type":"User","site_admin":false},"body":"Well, I have finished my first review of Spanish translation, so... pull request is here!\r\n\r\nI hope this branch is the correct one.","created_at":"2015-12-04T18:02:02Z","updated_at":"2015-12-14T19:24:19Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/heroku/12factor/pulls/57/commits","review_comments_url":"https://api.github.com/repos/heroku/12factor/pulls/57/comments","review_comment_url":"https://api.github.com/repos/heroku/12factor/pulls/comments{/number}","comments_url":"https://api.github.com/repos/heroku/12factor/issues/57/comments","statuses_url":"https://api.github.com/repos/heroku/12factor/statuses/cd9b3d9f344d5f7edbcc91472526bc7d5236e353","head":{"label":"sblancov:spanish_translation","ref":"spanish_translation","sha":"cd9b3d9f344d5f7edbcc91472526bc7d5236e353","user":{"login":"sblancov","id":4477786,"avatar_url":"https://avatars.githubusercontent.com/u/4477786?v=3","gravatar_id":"","url":"https://api.github.com/users/sblancov","html_url":"https://github.com/sblancov","followers_url":"https://api.github.com/users/sblancov/followers","following_url":"https://api.github.com/users/sblancov/following{/other_user}","gists_url":"https://api.github.com/users/sblancov/gists{/gist_id}","starred_url":"https://api.github.com/users/sblancov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sblancov/subscriptions","organizations_url":"https://api.github.com/users/sblancov/orgs","repos_url":"https://api.github.com/users/sblancov/repos","events_url":"https://api.github.com/users/sblancov/events{/privacy}","received_events_url":"https://api.github.com/users/sblancov/received_events","type":"User","site_admin":false},"repo":{"id":44564117,"name":"12factor","full_name":"sblancov/12factor","owner":{"login":"sblancov","id":4477786,"avatar_url":"https://avatars.githubusercontent.com/u/4477786?v=3","gravatar_id":"","url":"https://api.github.com/users/sblancov","html_url":"https://github.com/sblancov","followers_url":"https://api.github.com/users/sblancov/followers","following_url":"https://api.github.com/users/sblancov/following{/other_user}","gists_url":"https://api.github.com/users/sblancov/gists{/gist_id}","starred_url":"https://api.github.com/users/sblancov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sblancov/subscriptions","organizations_url":"https://api.github.com/users/sblancov/orgs","repos_url":"https://api.github.com/users/sblancov/repos","events_url":"https://api.github.com/users/sblancov/events{/privacy}","received_events_url":"https://api.github.com/users/sblancov/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/sblancov/12factor","description":"","fork":true,"url":"https://api.github.com/repos/sblancov/12factor","forks_url":"https://api.github.com/repos/sblancov/12factor/forks","keys_url":"https://api.github.com/repos/sblancov/12factor/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sblancov/12factor/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sblancov/12factor/teams","hooks_url":"https://api.github.com/repos/sblancov/12factor/hooks","issue_events_url":"https://api.github.com/repos/sblancov/12factor/issues/events{/number}","events_url":"https://api.github.com/repos/sblancov/12factor/events","assignees_url":"https://api.github.com/repos/sblancov/12factor/assignees{/user}","branches_url":"https://api.github.com/repos/sblancov/12factor/branches{/branch}","tags_url":"https://api.github.com/repos/sblancov/12factor/tags","blobs_url":"https://api.github.com/repos/sblancov/12factor/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sblancov/12factor/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sblancov/12factor/git/refs{/sha}","trees_url":"https://api.github.com/repos/sblancov/12factor/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sblancov/12factor/statuses/{sha}","languages_url":"https://api.github.com/repos/sblancov/12factor/languages","stargazers_url":"https://api.github.com/repos/sblancov/12factor/stargazers","contributors_url":"https://api.github.com/repos/sblancov/12factor/contributors","subscribers_url":"https://api.github.com/repos/sblancov/12factor/subscribers","subscription_url":"https://api.github.com/repos/sblancov/12factor/subscription","commits_url":"https://api.github.com/repos/sblancov/12factor/commits{/sha}","git_commits_url":"https://api.github.com/repos/sblancov/12factor/git/commits{/sha}","comments_url":"https://api.github.com/repos/sblancov/12factor/comments{/number}","issue_comment_url":"https://api.github.com/repos/sblancov/12factor/issues/comments{/number}","contents_url":"https://api.github.com/repos/sblancov/12factor/contents/{+path}","compare_url":"https://api.github.com/repos/sblancov/12factor/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sblancov/12factor/merges","archive_url":"https://api.github.com/repos/sblancov/12factor/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sblancov/12factor/downloads","issues_url":"https://api.github.com/repos/sblancov/12factor/issues{/number}","pulls_url":"https://api.github.com/repos/sblancov/12factor/pulls{/number}","milestones_url":"https://api.github.com/repos/sblancov/12factor/milestones{/number}","notifications_url":"https://api.github.com/repos/sblancov/12factor/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sblancov/12factor/labels{/name}","releases_url":"https://api.github.com/repos/sblancov/12factor/releases{/id}","created_at":"2015-10-19T21:06:57Z","updated_at":"2015-10-19T21:06:58Z","pushed_at":"2015-12-04T17:52:25Z","git_url":"git://github.com/sblancov/12factor.git","ssh_url":"git@github.com:sblancov/12factor.git","clone_url":"https://github.com/sblancov/12factor.git","svn_url":"https://github.com/sblancov/12factor","homepage":"http://www.12factor.net/","size":727,"stargazers_count":0,"watchers_count":0,"language":"CSS","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"heroku:spanish-translation","ref":"spanish-translation","sha":"6b144ad565a3288a5cee668392df3b1ca5891398","user":{"login":"heroku","id":23211,"avatar_url":"https://avatars.githubusercontent.com/u/23211?v=3","gravatar_id":"","url":"https://api.github.com/users/heroku","html_url":"https://github.com/heroku","followers_url":"https://api.github.com/users/heroku/followers","following_url":"https://api.github.com/users/heroku/following{/other_user}","gists_url":"https://api.github.com/users/heroku/gists{/gist_id}","starred_url":"https://api.github.com/users/heroku/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/heroku/subscriptions","organizations_url":"https://api.github.com/users/heroku/orgs","repos_url":"https://api.github.com/users/heroku/repos","events_url":"https://api.github.com/users/heroku/events{/privacy}","received_events_url":"https://api.github.com/users/heroku/received_events","type":"Organization","site_admin":false},"repo":{"id":11643366,"name":"12factor","full_name":"heroku/12factor","owner":{"login":"heroku","id":23211,"avatar_url":"https://avatars.githubusercontent.com/u/23211?v=3","gravatar_id":"","url":"https://api.github.com/users/heroku","html_url":"https://github.com/heroku","followers_url":"https://api.github.com/users/heroku/followers","following_url":"https://api.github.com/users/heroku/following{/other_user}","gists_url":"https://api.github.com/users/heroku/gists{/gist_id}","starred_url":"https://api.github.com/users/heroku/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/heroku/subscriptions","organizations_url":"https://api.github.com/users/heroku/orgs","repos_url":"https://api.github.com/users/heroku/repos","events_url":"https://api.github.com/users/heroku/events{/privacy}","received_events_url":"https://api.github.com/users/heroku/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/heroku/12factor","description":"","fork":true,"url":"https://api.github.com/repos/heroku/12factor","forks_url":"https://api.github.com/repos/heroku/12factor/forks","keys_url":"https://api.github.com/repos/heroku/12factor/keys{/key_id}","collaborators_url":"https://api.github.com/repos/heroku/12factor/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/heroku/12factor/teams","hooks_url":"https://api.github.com/repos/heroku/12factor/hooks","issue_events_url":"https://api.github.com/repos/heroku/12factor/issues/events{/number}","events_url":"https://api.github.com/repos/heroku/12factor/events","assignees_url":"https://api.github.com/repos/heroku/12factor/assignees{/user}","branches_url":"https://api.github.com/repos/heroku/12factor/branches{/branch}","tags_url":"https://api.github.com/repos/heroku/12factor/tags","blobs_url":"https://api.github.com/repos/heroku/12factor/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/heroku/12factor/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/heroku/12factor/git/refs{/sha}","trees_url":"https://api.github.com/repos/heroku/12factor/git/trees{/sha}","statuses_url":"https://api.github.com/repos/heroku/12factor/statuses/{sha}","languages_url":"https://api.github.com/repos/heroku/12factor/languages","stargazers_url":"https://api.github.com/repos/heroku/12factor/stargazers","contributors_url":"https://api.github.com/repos/heroku/12factor/contributors","subscribers_url":"https://api.github.com/repos/heroku/12factor/subscribers","subscription_url":"https://api.github.com/repos/heroku/12factor/subscription","commits_url":"https://api.github.com/repos/heroku/12factor/commits{/sha}","git_commits_url":"https://api.github.com/repos/heroku/12factor/git/commits{/sha}","comments_url":"https://api.github.com/repos/heroku/12factor/comments{/number}","issue_comment_url":"https://api.github.com/repos/heroku/12factor/issues/comments{/number}","contents_url":"https://api.github.com/repos/heroku/12factor/contents/{+path}","compare_url":"https://api.github.com/repos/heroku/12factor/compare/{base}...{head}","merges_url":"https://api.github.com/repos/heroku/12factor/merges","archive_url":"https://api.github.com/repos/heroku/12factor/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/heroku/12factor/downloads","issues_url":"https://api.github.com/repos/heroku/12factor/issues{/number}","pulls_url":"https://api.github.com/repos/heroku/12factor/pulls{/number}","milestones_url":"https://api.github.com/repos/heroku/12factor/milestones{/number}","notifications_url":"https://api.github.com/repos/heroku/12factor/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/heroku/12factor/labels{/name}","releases_url":"https://api.github.com/repos/heroku/12factor/releases{/id}","created_at":"2013-07-24T19:32:31Z","updated_at":"2015-12-14T05:03:00Z","pushed_at":"2015-12-04T18:02:02Z","git_url":"git://github.com/heroku/12factor.git","ssh_url":"git@github.com:heroku/12factor.git","clone_url":"https://github.com/heroku/12factor.git","svn_url":"https://github.com/heroku/12factor","homepage":"http://www.12factor.net/","size":1843,"stargazers_count":698,"watchers_count":698,"language":"CSS","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":143,"mirror_url":null,"open_issues_count":7,"forks":143,"open_issues":7,"watchers":698,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/heroku/12factor/pulls/57"},"html":{"href":"https://github.com/heroku/12factor/pull/57"},"issue":{"href":"https://api.github.com/repos/heroku/12factor/issues/57"},"comments":{"href":"https://api.github.com/repos/heroku/12factor/issues/57/comments"},"review_comments":{"href":"https://api.github.com/repos/heroku/12factor/pulls/57/comments"},"review_comment":{"href":"https://api.github.com/repos/heroku/12factor/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/heroku/12factor/pulls/57/commits"},"statuses":{"href":"https://api.github.com/repos/heroku/12factor/statuses/cd9b3d9f344d5f7edbcc91472526bc7d5236e353"}}}}