├── .editorconfig ├── .github ├── FUNDING.yml └── workflows │ ├── characters.yml │ └── docs.yml ├── .typos.toml ├── LICENSE ├── README.hu.md └── README.md /.editorconfig: -------------------------------------------------------------------------------- 1 | # https://EditorConfig.org 2 | 3 | root = true 4 | 5 | [*] 6 | indent_style = space 7 | indent_size = 4 8 | end_of_line = lf 9 | charset = utf-8 10 | trim_trailing_whitespace = true 11 | insert_final_newline = true 12 | block_comment_start = /* 13 | block_comment = * 14 | block_comment_end = */ 15 | 16 | [*.yml] 17 | indent_size = 4 18 | 19 | [*.md] 20 | trim_trailing_whitespace = false 21 | -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | github: "szepeviktor" 2 | -------------------------------------------------------------------------------- /.github/workflows/characters.yml: -------------------------------------------------------------------------------- 1 | # yaml-language-server: $schema=https://json.schemastore.org/github-workflow 2 | 3 | name: "Characters" 4 | 5 | on: # yamllint disable-line rule:truthy 6 | push: 7 | branches: 8 | - "master" 9 | pull_request: null 10 | # Add [skip ci] to commit message to skip CI. 11 | 12 | permissions: 13 | contents: "read" 14 | 15 | concurrency: 16 | group: "${{ github.workflow }}-${{ github.ref }}" 17 | cancel-in-progress: true 18 | 19 | jobs: 20 | spelling: 21 | name: "Spelling" 22 | runs-on: "ubuntu-24.04" 23 | steps: 24 | - 25 | name: "Checkout repository" 26 | uses: "actions/checkout@v4" 27 | - 28 | name: "Search for misspellings" 29 | uses: "crate-ci/typos@master" 30 | 31 | editorconfig: 32 | name: "EditorConfig" 33 | runs-on: "ubuntu-24.04" 34 | steps: 35 | - 36 | name: "Checkout repository" 37 | uses: "actions/checkout@v4" 38 | - 39 | name: "Check EditorConfig configuration" 40 | run: "test -f .editorconfig" 41 | - 42 | name: "Check adherence to EditorConfig" 43 | uses: "greut/eclint-action@v0" 44 | -------------------------------------------------------------------------------- /.github/workflows/docs.yml: -------------------------------------------------------------------------------- 1 | # yaml-language-server: $schema=https://json.schemastore.org/github-workflow 2 | 3 | name: "Docs" 4 | 5 | on: # yamllint disable-line rule:truthy 6 | push: 7 | branches: 8 | - "master" 9 | paths: 10 | - "**/*.md" 11 | pull_request: 12 | paths: 13 | - "**/*.md" 14 | # Add [skip ci] to commit message to skip CI. 15 | 16 | permissions: 17 | contents: "read" 18 | 19 | concurrency: 20 | group: "${{ github.workflow }}-${{ github.ref }}" 21 | cancel-in-progress: true 22 | 23 | jobs: 24 | markdown: 25 | name: "Markdown" 26 | runs-on: "ubuntu-24.04" 27 | steps: 28 | - 29 | name: "Checkout repository" 30 | uses: "actions/checkout@v4" 31 | - 32 | name: "Check Markdown documents" 33 | uses: "DavidAnson/markdownlint-cli2-action@v19" 34 | with: 35 | globs: "**/*.md" 36 | -------------------------------------------------------------------------------- /.typos.toml: -------------------------------------------------------------------------------- 1 | [files] 2 | extend-exclude = [ 3 | ".git/", 4 | ] 5 | ignore-hidden = false 6 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | This is free and unencumbered software released into the public domain. 2 | 3 | Anyone is free to copy, modify, publish, use, compile, sell, or 4 | distribute this software, either in source code form or as a compiled 5 | binary, for any purpose, commercial or non-commercial, and by any 6 | means. 7 | 8 | In jurisdictions that recognize copyright laws, the author or authors 9 | of this software dedicate any and all copyright interest in the 10 | software to the public domain. We make this dedication for the benefit 11 | of the public at large and to the detriment of our heirs and 12 | successors. We intend this dedication to be an overt act of 13 | relinquishment in perpetuity of all present and future rights to this 14 | software under copyright law. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 19 | IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR 20 | OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 21 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 22 | OTHER DEALINGS IN THE SOFTWARE. 23 | 24 | For more information, please refer to 25 | -------------------------------------------------------------------------------- /README.hu.md: -------------------------------------------------------------------------------- 1 | # Speciális infrastruktúra webes alkalmazásokhoz 2 | 3 | [![en](https://img.shields.io/badge/lang-English%20%F0%9F%87%AC%F0%9F%87%A7-white)](README.md) 4 | [![hu](https://img.shields.io/badge/nyelv-magyar%20%F0%9F%87%AD%F0%9F%87%BA-white)](README.hu.md) 5 | [![elmélet](https://img.shields.io/badge/több-elmélet-purple)](https://github.com/stars/szepeviktor/lists/theory) 6 | 7 | Ez a dokumentum több száz életből vett incidens eredménye. 8 | `#SaaS` 9 | 10 | Szolgáltatás nyújtásnál az az irányelvem, 11 | hogy **specializált szolgáltatókat használjunk**, ne népszerűeket, sohasem ingyeneseket. 12 | 13 | ## WWW 14 | 15 | :rock: A Világháló az Internet része, 16 | tehát az Internethez kell kapcsolódnunk, és webes szolgáltatásokat nyújtani. 17 | 18 | ## Infrastruktúra 19 | 20 | - Domain regisztrátor 21 | - DNS szolgáltató 22 | - Szerver szolgáltató 23 | - SSL tanúsítvány kiadó 24 | - CDN szolgáltató 25 | - Tranzakciós email szolgáltató 26 | - Tárterület szolgáltató biztonsági mentéshez 27 | 28 | ## Enterprise ready szerver szolgáltató 29 | 30 | A "felhő" valójában virtualizációt **és** szerver klasztereket jelent. 31 | Sok úgynevezett felhő szolgáltató csak egy fizikai szervert virtualizál. 32 | 33 | 1. Szoftveralapú **és** redundáns hálózat 34 | 2. Szoftveralapú **és** redundáns tároló (storage) 35 | 3. Szoftveralapú **és** redundáns szerverek 36 | (CPU+memória) :point_left: ez nagyon nehéz 37 | 4. Vékony azaz hatékony virtualizációs réteg 38 | 39 | ## Operációs rendszer, middleware, futtatókörnyezet 40 | 41 | 1. Debian GNU/Linux alapon 42 | 2. Minden egyes szerver szoftver ismerete, a használaton kívüliek eltávolítása 43 | 3. A szerveren lévő minden egyes fájl ellenőrzés alatt tartása (pl. csomagok, git) 44 | 4. Kernel, fájlrendszer és minden egyes szerver szoftver 45 | monitorozása funkcionális tesztekkel, nem csak "pingekkel" 46 | 47 | ### Middleware 48 | 49 | - Apache httpd 50 | - PHP-FPM (FastCGI Process Manager) 51 | - Redis memóriaalapú gyorsítótár 52 | - MariaDB adatbázis 53 | 54 | ## A webes alkalmazás 55 | 56 | Írjunk a lehető legkevesebb forráskódot. 57 | Alaposan tesztelt csomagokra és **specializált** szolgáltatókra építsünk. 58 | 59 | - Integrált ügyfélkapcsolat 60 | - Betűtípusok 61 | - Videók 62 | - Térképek 63 | - HTML widget-ek 64 | - Reklám 65 | - Látogató mérés 66 | - fizetés feldolgozó 67 | - Email cím ellenőrzés 68 | - SMS gateway 69 | - Hitelesítés 70 | - Hibakövetés 71 | 72 | Az éles környezetek emberi beavatkozás nélkül üzemeljenek. 73 | Minden problémát meg kéne tudni oldani CI-jal 74 | és anonimizált staging környezetekkel. 75 | 76 | :bulb: Ismerje fel a technikai adósságát, 77 | amikor kézzel kell dolgozni az éles környezetben. 78 | 79 | Havi egyetlen egy _Technikai Adósság Nap_ a stresszt örömmé változtatja. 80 | 81 | ## Együttműködés szolgáltatókkal, szoftver készítőkkel 82 | 83 | Az alkalmazása függ másoktól! 84 | 85 | ### Vizsgálja meg a szolgáltatóit 86 | 87 | - Célközönség 88 | - Specializált szolgáltató kontra populista szolgáltató (minőség kontra mennyiség) 89 | - Tőke 90 | - Beszéljen a CEO-val és az alkalmazottakkal 91 | - Derítse fel a tapasztaltságukat a blogjukból, egy demó keretén belül 92 | - Hozzáállás és átláthatóság 93 | - Használhatóság 94 | - Infrastruktúra 95 | - A szolgáltató szolgáltatói 96 | - Integráció és API-k 97 | - Ár-érték arány 98 | 99 | ### Ismerje a szoftver készítőket, akiktől függ 100 | 101 | - Hozzáállás 102 | - Válasz a hibajegyekre 103 | - Nyitottság a közreműködők felé 104 | - Teszt lefedettség (coverage) 105 | - Kiadások (release) gyakorisága 106 | - Minőségbiztosítási eszközök CI-ban 107 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Special infrastructure for web applications 2 | 3 | [![hu](https://img.shields.io/badge/nyelv-magyar%20%F0%9F%87%AD%F0%9F%87%BA-white)](README.hu.md) 4 | [![en](https://img.shields.io/badge/lang-English%20%F0%9F%87%AC%F0%9F%87%A7-white)](README.md) 5 | [![theories](https://img.shields.io/badge/more-theories-purple)](https://github.com/stars/szepeviktor/lists/theory) 6 | 7 | This document is the result of several hundreds of real-life incidents. 8 | `#SaaS` 9 | 10 | My policy on providing services is to **use specialized service providers**, 11 | not popular ones, never free ones. 12 | 13 | ## WWW 14 | 15 | 🪨 The World Wide Web is part of the Internet, 16 | so we need to connect to the Internet and provide web services. 17 | 18 | ## Infrastructure 19 | 20 | - Domain registrar 21 | - DNS provider 22 | - Server provider 23 | - SSL certificate vendor 24 | - CDN provider 25 | - Transactional email provider 26 | - Storage provider for backup 27 | 28 | ## Enterprise ready server provider 29 | 30 | "Cloud" really means virtualization **and** server clusters. 31 | Many so-called cloud providers only virtualize a single physical server. 32 | 33 | 1. Software defined **and** redundant network 34 | 2. Software defined **and** redundant storage 35 | 3. Software defined **and** redundant servers 36 | (CPU+memory) 👈🏻 this is very-very hard 37 | 4. Thin, thus performant virtualization layer 38 | 39 | ## OS, middleware, runtime 40 | 41 | 1. Build on Debian GNU/Linux 42 | 2. Know each software on your server; uninstall all unused 43 | 3. Keep every file on your server under control (e.g. packages, git) 44 | 4. Monitor the kernel, the filesystem and every server software 45 | with functional tests, not just "pings" 46 | 47 | ### Middleware 48 | 49 | - Apache httpd 50 | - PHP-FPM (FastCGI Process Manager) 51 | - Redis in-memory cache 52 | - MariaDB database 53 | 54 | ## The Web Application 55 | 56 | Write as little code as it is possible. 57 | Build on well-tested packages and **specialized** providers. 58 | 59 | - Integrated customer relations 60 | - Fonts 61 | - Videos 62 | - Maps 63 | - HTML widgets 64 | - Advertisement 65 | - Visitor tracking 66 | - Payment gateway 67 | - Email address verification 68 | - SMS gateway 69 | - Authentication 70 | - Error tracking 71 | 72 | Run production environments without humans. 73 | Every problem should be solvable with CI 74 | and anonymized staging environments. 75 | 76 | 💡 Recognize your tech debt when you are manually working 77 | on a production environment. 78 | 79 | Only 1 _Tech Debt Day_ per month can tip the scales from stress to joy. 80 | 81 | ## Cooperating with providers, software authors 82 | 83 | Your application depends on others! 84 | 85 | ### Analyze your service providers 86 | 87 | - Target audience 88 | - Specialized provider vs. populist provider (quality vs. quantity) 89 | - Funds 90 | - Talk to the CEO and employees 91 | - Discovery expertise by reading their blog, asking for a demo 92 | - Attitude and transparency 93 | - Usability 94 | - Infrastructure 95 | - Service providers 96 | - Integrations and API-s 97 | - Price-value ratio 98 | 99 | ### Know the software authors you depend on 100 | 101 | - Attitude 102 | - Response to bug reports 103 | - Openness to contributors 104 | - Coverage 105 | - Release frequency 106 | - QA tools in CI 107 | --------------------------------------------------------------------------------