How to scale a website to support millions of users? We will explain this step-by-step.
The diagram below illustrates the evolution of a simplified eCommerce website. It goes from a monolithic design on one single server, to a service-oriented/microservice architecture.
Suppose we have two services: inventory service (handles product descriptions and inventory management) and user service (handles user information, registration, login, etc.).
Step 1 - With the growth of the user base, one single application server cannot handle the traffic anymore. We put the application server and the database server into two separate servers.
Step 2 - The business continues to grow, and a single application server is no longer enough. So we deploy a cluster of application servers.
Step 3 - Now the incoming requests have to be routed to multiple application servers, how can we ensure each application server gets an even load? The load balancer handles this nicely.
To read more link
The diagram below illustrates the evolution of a simplified eCommerce website. It goes from a monolithic design on one single server, to a service-oriented/microservice architecture.
Suppose we have two services: inventory service (handles product descriptions and inventory management) and user service (handles user information, registration, login, etc.).
Step 1 - With the growth of the user base, one single application server cannot handle the traffic anymore. We put the application server and the database server into two separate servers.
Step 2 - The business continues to grow, and a single application server is no longer enough. So we deploy a cluster of application servers.
Step 3 - Now the incoming requests have to be routed to multiple application servers, how can we ensure each application server gets an even load? The load balancer handles this nicely.
To read more link
Hi guys.
Django Image Optimizer 🍏🍋🍊
This package is very useful to optimize image in your django projects and is simple to configure it.
It allows you optimization by images using TinyPNG or Pillow.
You can introduce with it in this link.
Django Image Optimizer 🍏🍋🍊
This package is very useful to optimize image in your django projects and is simple to configure it.
It allows you optimization by images using TinyPNG or Pillow.
You can introduce with it in this link.
PyPI
django-image-optimizer
Django Image Optimizer (Compressor)
👍1🔥1
https://t.me/shukurdev/1055
In django in the one coolest case will might be used this method 🤩🥳
If you are gonna make SearchView for your project you have to search terms in the any of the models in the application and to do this you search objects by term and you had returned all of object types as separately untill now. So now with this method you will have chance to return results of the objects which you have searched as single keyword which is mean {"key": "value"}.
👆👆👆have showed example in the above image.
p.s: please write comments 😅
In django in the one coolest case will might be used this method 🤩🥳
If you are gonna make SearchView for your project you have to search terms in the any of the models in the application and to do this you search objects by term and you had returned all of object types as separately untill now. So now with this method you will have chance to return results of the objects which you have searched as single keyword which is mean {"key": "value"}.
👆👆👆have showed example in the above image.
p.s: please write comments 😅
🔥1
Use select_for_update() method in Django when you have problem with concurrency.
Agar sizda bir vaqting uzida bir nechta process ni ishga tushirishda muammo bulayotgan bulsa shu method dan foydalanganingiz maqul chuni bu bir process ni yakunlab bulgunicha usha process ni lock qilib turadi va keyin ikkinchi process ga ruhsat beradi.
Link: https://www.sankalpjonna.com/learn-django/managing-concurrency-in-django-using-select-for-update
Agar sizda bir vaqting uzida bir nechta process ni ishga tushirishda muammo bulayotgan bulsa shu method dan foydalanganingiz maqul chuni bu bir process ni yakunlab bulgunicha usha process ni lock qilib turadi va keyin ikkinchi process ga ruhsat beradi.
Link: https://www.sankalpjonna.com/learn-django/managing-concurrency-in-django-using-select-for-update
Sankalpjonna
Managing concurrency in Django using select_for_update
A tutorial on how one can use select_for_update to lock a Django queryset until the transaction it is in is committed in order to handle concurrency.
👍2🔥2
Django and DRF
Deploying 1. https://www.digitalocean.com/community/tutorials/how-to-set-up-django-with-postgres-nginx-and-gunicorn-on-ubuntu-20-04
👆👍👏💡 This is very useful guide to deployment process
💡 Django Celery Beat is the best package to store tasks which can done as automatically on database. And you can manage all of saved tasks on Django Admin panel and you can create, edit and delete tasks and how often they should run with Periodic Tasks
🫐Pypi package
🍉Source
🫐Pypi package
🍉Source
PyPI
django-celery-beat
Database-backed Periodic Tasks.
👍2😁2
Javascript dasturchisi Python code yozsa qanday bularkin deydiganlar uchun Top🍉 examples 🥳
Va bu code ni review qilayotgan men: 😰🥵🤯🤬
P.S: Qanday tilda kod yozsangiz ham har bir tilni uzini qonun qoidalari asosida yozishga harakat qiling please. Sizdan keyingi keladigan dasturchilarni ham ozgina o'ylang, f***, b** kabi so'zlarni eshitmay desangiz 😎
Va bu code ni review qilayotgan men: 😰🥵🤯🤬
P.S: Qanday tilda kod yozsangiz ham har bir tilni uzini qonun qoidalari asosida yozishga harakat qiling please. Sizdan keyingi keladigan dasturchilarni ham ozgina o'ylang, f***, b** kabi so'zlarni eshitmay desangiz 😎
🤣1
Deploy web applications which is made with django on the Render.
https://testdriven.io/blog/django-render/
https://testdriven.io/blog/django-render/
testdriven.io
Deploying a Django App to Render
This tutorial looks at how to deploy a Django application to Render.
In some cases django devs have one problem with migrations files, so i think the guy who is first met with this issue is gonna delete all of migrations and data in DB. if he does this in the production he will might lost all real data 😰🥴🥶.
Ok WHAT SHOULD IT DO ???
Django has — fake flag which is written with migrate command together like this: python manage.py migrate —fake
It tells to Django that migrations have already applied and not need to run it(DON'T RUN IT).
Actually it creates a row in django_migrations table but not run in the SQL to change table structure.
In one another case if you have multiple migrations file you can delete all of them and use above flag(argument).
Ok WHAT SHOULD IT DO ???
Django has — fake flag which is written with migrate command together like this: python manage.py migrate —fake
It tells to Django that migrations have already applied and not need to run it(DON'T RUN IT).
Actually it creates a row in django_migrations table but not run in the SQL to change table structure.
In one another case if you have multiple migrations file you can delete all of them and use above flag(argument).
🔥 I absolutely recommended reading this article to learn more about object serializing way and you realize that which way is the best to serialize in short time.
https://hakibenita.com/django-rest-framework-slow
https://hakibenita.com/django-rest-framework-slow
Devops haqida bu saytdagi🍊 maqolalar juda yaxshi yozilyapti uzbek tilida 😍
Github actions haqida: https://devops-journey.uz/guides/ci-cd/github-actions-ci-cd.en-UZ
Github actions haqida: https://devops-journey.uz/guides/ci-cd/github-actions-ci-cd.en-UZ
devops-journey.uz
Asosiy - DevOps Journey
DevOps bo'yicha bepul ta'lim platformasi bo'lgan DevOps Journey-ga xush kelibsiz
Backend Dasturchilar uchun 10 ta eng muhim operatsion tizim konseptsiyasi.
https://masteringbackend.com/posts/the-10-operating-system-concepts-for-backend-developers
https://masteringbackend.com/posts/the-10-operating-system-concepts-for-backend-developers
Mastering Backend
The 10 Operating System Concepts for Backend Developers
This lesson will explore important concepts to learn in operating systems as a backend engineer.
👍2