Postgres and Kubernetes

When I decided to deploy all my services on Kubernetes, one of the critical components was the PostgreSQL database. Deploying databases on Kubernetes can be challenging due to their stateful nature. In this post, I’ll share how I deployed PostgreSQL on Kubernetes, the challenges I faced, and why I chose the CrunchyData PostgreSQL Operator. Understanding Stateful vs. Stateless Applications Before diving into deployment, it’s essential to understand the difference between stateful and stateless applications....

арван нэгдүгээр сар 3, 2024 · 4 мин · 740 үг · Me

Astring- Front-end

I don’t have much experience in front-end development. When I started working on my web project, I decided to use React with TypeScript. It felt like a natural choice since it’s popular, has a huge ecosystem, and I wanted the type safety that TypeScript offers. Things were fine at first, but as I progressed, I realized there was more to front-end development than just writing code. Phase 1: Styling from Scratch Feeling confident, I thought, Why not write all the styles from scratch?...

арван нэгдүгээр сар 2, 2024 · 6 мин · 1181 үг · Me

Astring- Infrastructure

When I first started building my application, everything ran smoothly on my laptop. Development was straightforward, and I had full control over my environment. However, as the project grew, I needed to deploy it so others could access and test it. This is where my journey into infrastructure began—a journey that took me through cloud services like Fly.io and Vercel, into managed Kubernetes on Linode, and eventually to an on-premise Kubernetes cluster....

аравдугаар сар 18, 2024 · 5 мин · 1011 үг · Me

Astring- Storage

In my chat application, I need reliable object storage for handling media and file uploads. Beyond that, I also need storage for backups, logs, and other critical data. Choosing the right storage solution turned out to be one of the hardest decisions. Each option I explored had its strengths and weaknesses, and finding the right balance for both development and production was challenging. What is Object Storage? Object storage is a way of storing and managing data as discrete units called objects....

аравдугаар сар 16, 2024 · 5 мин · 1029 үг · Me

Astring- Scaling the Application

Scaling a backend application can be challenging, especially when it’s built around WebSocket servers handling a large number of user sessions. On its own, a single WebSocket server can’t handle all the users, right? So, how do we scale the application effectively to meet increasing demands? When scaling horizontally, several issues arise. For instance, imagine that User A is connected to Server X, and User B is connected to Server Y....

аравдугаар сар 14, 2024 · 4 мин · 769 үг · Me

Astring- Finding right Database

Мэдээж чатуудыг хадгалах шаардлагатай. Үүний тулд өгөгдлийн сан шаардлагатай ба хамгийн эхэнд санаанд орсон нь PostgreSQL байсан. Ер нь би шинэ юм хийхэд байнга л ашигладаг database-н нэг нь. Яагаад анх сонгосон бэ гэвэл: Ecosystem: PostgreSQL олон жилийн турш хөгжиж ирсэн. Community support маш сайн, documentation сайн бас олон extension-үүд байдаг. Data Integrity: PostgreSQL нь **ACID compliance-**тай тул өгөгдлийн найдвартай байдлыг хангана. Powerful Querying: SQL engine нь маш сайн, complex query, indexing стратеги болон **full-text search-**ийг дэмждэг....

аравдугаар сар 10, 2024 · 3 мин · 488 үг · Me

Astring

Шинэ пост бичээгүй уджээ. Өнөөдрөөс эхлэн өөрийн чат аппликейшны талаархи туршлагаасаа хуваалцахаар шийдлээ. Юун түрүүнд, программчлалыг яагаад сурч эхэлснээс эхэлье. Яагаад? Бодлого бодох дуртай, түүнтэй холбоотой зүйлд сониуч хүүхэд байж билээ. Анх 11-р ангид байхад, математикийн багш маань надад компьютер ашиглан боддог бодлогууд байдаг гэж хэлж байсан нь миний сонирхлыг татсан. Би нилээн гайхаж, багшаасаа: “Яг ямархуу бодлогууд вэ? Компьютер ашиглана гэдэг нь юу гэсэн үг вэ?” Багш яг хэрхэн ажилладгийг нь сайн мэдэхгүй байсан ч нэг жишээ бодлого үзүүлж байсан нь:...

аравдугаар сар 4, 2024 · 3 мин · 576 үг · Me