How NewsGo is built
A plain-English explanation of the servers, the software, and the real performance numbers — written for people who don't write code for a living.
What is a VPS?
A VPS (Virtual Private Server) is a rented computer in a data centre that runs 24/7 and serves the website to anyone who visits. Think of it as a dedicated employee who answers every visitor's request around the clock. The three specs that matter most are CPU, RAM, and storage.
Server comparison
| Spec |
VPS 1 — Old |
VPS 2 — Current |
| CPU cores |
1 core |
2 cores |
| RAM |
2 GB |
8 GB |
| SSD Storage |
25 GB NVMe |
100 GB NVMe |
| Web server |
App only |
App + Nginx |
CPU — the number of chefs in the kitchen
1 CPU core
One chef in the kitchen. Every order is prepared one at a time. When traffic spikes, a queue builds up — earlier customers wait while the chef finishes the current dish.
2 CPU cores
Two chefs working in parallel. When 200 people arrive at once, both cores handle requests simultaneously, halving the time customers spend waiting.
RAM — the kitchen counter space
2 GB RAM
A small counter. The chef can only keep a few ingredients out at once — room for the app, the database connections, and not much else. Adding features risks running out of space.
8 GB RAM
A large counter. The app, the AI semantic search engine (Ollama), nginx, and the database can all run simultaneously without competing for space. Comfortable headroom for growth.
NVMe SSD — the pantry
25 GB
A small pantry. Fits the operating system, the app, and an early-stage database. Once the article archive grows, there is no room to expand without migrating everything.
100 GB
A spacious pantry. Years of articles, uploaded images, AI model files (Ollama), and database backups fit comfortably. NVMe means reads and writes are extremely fast — no spinning hard drive delays.
Nginx — the front-door receptionist
Nginx is a piece of software that sits in front of the Go application and manages every incoming visitor before the app ever sees them.
→
SSL termination
Nginx handles the HTTPS padlock encryption so the Go app doesn't have to. Every visitor's connection is encrypted without the app lifting a finger.
→
Static file serving
CSS, JavaScript, and image files are served directly by Nginx from disk — without the Go app being involved at all. Faster for the visitor, less work for the application.
→
Connection buffering
When 200 visitors arrive at once, Nginx accepts all their connections instantly and queues requests to the app in an orderly way — preventing the app from being overwhelmed.
→
Gzip compression
Nginx compresses responses before sending them to the browser, reducing how much data travels over the network. Pages load faster on slower connections.
Real numbers — stress test results
These numbers are from a live load test: 200 simultaneous users, each making 50 requests as fast as possible — 10,000 total requests per run. Like sending the entire audience of a medium-sized concert to the website at the exact same moment.
| Metric |
VPS 1 — no nginx |
VPS 2 — before nginx |
VPS 2 — with nginx |
| Requests/second |
251 |
452 |
466 |
| Avg. response time |
756 ms |
207 ms |
147 ms |
| Slowest response |
1,013 ms |
2,447 ms |
652 ms |
| 99th percentile |
925 ms |
392 ms |
273 ms |
| Failed requests |
0 |
49 timeouts |
66 timeouts |
| Test duration |
41 s |
17 s |
15 s |
How to read this: "99th percentile 273 ms" means 99 out of every 100 visitors got a response in under 273 milliseconds. The timeout failures occur because the test pushes beyond what a single server is tuned for under a synthetic burst; real-world traffic arrives more gradually and does not trigger them.
What this means in practice
5×
faster average response time compared to the old single-core server (147 ms vs 756 ms).
85%
reduction in worst-case response time (652 ms vs 2,447 ms before nginx was configured).
466
requests handled per second — equivalent to serving over 1.6 million page views per hour from a single mid-range server.
Full technology stack
Language
Go — fast, low memory footprint, compiles to a single binary
Database
PostgreSQL — stores all articles, users, and organisations
Web server
Nginx — reverse proxy, SSL, compression, static files
AI search
Ollama (local LLM) — semantic search without sending data to third parties
API
REST + RSS 2.0 — public, documented, rate-limited
Hosting
Single VPS — no cloud vendor lock-in, no per-request billing
Cum este construit NewsGo
O explicație pe înțeles despre servere, software și numere reale de performanță — scrisă pentru oameni care nu programează zi de zi.
Ce este un VPS?
Un VPS (Virtual Private Server) este un calculator închiriat într-un centru de date care funcționează non-stop și servește site-ul oricui îl vizitează. Gândește-te la el ca la un angajat dedicat care răspunde fiecărei cereri în jurul ceasului. Cele trei specificații care contează cel mai mult sunt CPU, RAM și stocarea.
Comparație servere
| Specificație |
VPS 1 — Vechi |
VPS 2 — Actual |
| Nuclee CPU |
1 nucleu |
2 nuclee |
| RAM |
2 GB |
8 GB |
| Stocare SSD |
25 GB NVMe |
100 GB NVMe |
| Server web |
Doar aplicație |
Aplicație + Nginx |
CPU — numărul de bucătari din bucătărie
1 nucleu CPU
Un singur bucătar în bucătărie. Fiecare comandă este pregătită pe rând. Când traficul crește brusc, se formează o coadă — clienții anteriori așteaptă până când bucătarul termină preparatul curent.
2 nuclee CPU
Doi bucătari care lucrează în paralel. Când sosesc 200 de persoane deodată, ambele nuclee gestionează cererile simultan, înjumătățind timpul de așteptare.
RAM — spațiul de lucru din bucătărie
2 GB RAM
Un blat mic. Bucătarul poate ține puține ingrediente la îndemână — loc pentru aplicație, conexiunile la baza de date și nu prea mult altceva. Adăugarea de funcții riscă să epuizeze spațiul.
8 GB RAM
Un blat mare. Aplicația, motorul de căutare AI (Ollama), nginx și baza de date pot rula simultan fără să concureze pentru spațiu. Marjă confortabilă pentru creștere.
NVMe SSD — cămara
25 GB
O cămară mică. Încape sistemul de operare, aplicația și o bază de date în fază incipientă. Pe măsură ce arhiva de articole crește, nu mai există loc fără o migrare completă.
100 GB
O cămară spațioasă. Ani de articole, imagini încărcate, fișierele modelului AI (Ollama) și copii de rezervă ale bazei de date încap confortabil. NVMe înseamnă citiri și scrieri extrem de rapide.
Nginx — recepționerul de la intrare
Nginx este un software care stă în fața aplicației Go și gestionează fiecare vizitator înainte ca aplicația să îl vadă.
→
Terminare SSL
Nginx gestionează criptarea HTTPS, astfel încât aplicația Go nu trebuie să se ocupe de asta. Conexiunea fiecărui vizitator este criptată fără ca aplicația să ridice un deget.
→
Servire fișiere statice
CSS-ul, JavaScript-ul și imaginile sunt livrate direct de Nginx de pe disc — fără ca aplicația Go să fie implicată deloc. Mai rapid pentru vizitator, mai puțin efort pentru aplicație.
→
Buffering conexiuni
Când 200 de vizitatori sosesc deodată, Nginx acceptă instantaneu toate conexiunile și le trimite ordonat către aplicație — prevenind supraîncărcarea.
→
Compresie Gzip
Nginx comprimă răspunsurile înainte de a le trimite browserului, reducând volumul de date transmis prin rețea. Paginile se încarcă mai repede pe conexiuni mai lente.
Numere reale — rezultate test de stres
Aceste cifre provin dintr-un test de încărcare real: 200 de utilizatori simultani, fiecare trimițând 50 de cereri cât mai rapid posibil — 10.000 de cereri totale per rulare. Ca și cum ai trimite publicul unui concert de dimensiuni medii pe site în același moment.
| Metrică |
VPS 1 — fără nginx |
VPS 2 — înainte nginx |
VPS 2 — cu nginx |
| Cereri/secundă |
251 |
452 |
466 |
| Timp răspuns mediu |
756 ms |
207 ms |
147 ms |
| Cel mai lent răspuns |
1.013 ms |
2.447 ms |
652 ms |
| Percentila 99 |
925 ms |
392 ms |
273 ms |
| Cereri eșuate |
0 |
49 timeout-uri |
66 timeout-uri |
| Durată test |
41 s |
17 s |
15 s |
Cum se citesc aceste date: „Percentila 99: 273 ms" înseamnă că 99 din 100 de vizitatori au primit răspuns în sub 273 de milisecunde. Erorile de timeout apar deoarece testul depășește limita unui server individual sub un trafic sintetic brusc; traficul real soseşte mai gradual și nu le declanșează.
Ce înseamnă în practică
5×
timp de răspuns mediu mai rapid față de serverul vechi cu un singur nucleu (147 ms față de 756 ms).
85%
reducere a celui mai lent timp de răspuns (652 ms față de 2.447 ms înainte de configurarea nginx).
466
cereri gestionate pe secundă — echivalent cu peste 1,6 milioane de vizualizări pe oră de pe un singur server de nivel mediu.
Stiva tehnologică completă
Limbaj
Go — rapid, consum redus de memorie, compilat într-un singur binar
Bază de date
PostgreSQL — stochează toate articolele, utilizatorii și organizațiile
Server web
Nginx — proxy invers, SSL, compresie, fișiere statice
Căutare AI
Ollama (LLM local) — căutare semantică fără a trimite date către terți
API
REST + RSS 2.0 — public, documentat, cu limitare de rată
Găzduire
Un singur VPS — fără dependență de furnizor cloud, fără facturare per cerere