https://virgool.io/@remohammadi/چه-شد-که-مایکروسرویس-xevulqbwq8w8
تجربه ناب برنامه نویسان کافه بازار در معماری میکرو سرویس و نحوه مهاجرت از سیستم قدیمی (monolithic) به معماری جدید
#bazaar #article #microservice
تجربه ناب برنامه نویسان کافه بازار در معماری میکرو سرویس و نحوه مهاجرت از سیستم قدیمی (monolithic) به معماری جدید
#bazaar #article #microservice
ویرگول
چه شد که مایکروسرویس؟!
چه استارتآپ چه گروئنآپ، تقسیم تسکها بین اعضای تیم در یک کسب و کار پویا مثل کسب و کارهای اینترنتی چالش قابل توجهی است؛ مهمترین کار مجموعه نیست ولی مهم است مهمترین احتمالاً تشخیص تسکهایی است که لازم است انجام بدهید از تسکهایی که چندان هم ضرورت ندارند،…
When you use
the set. For that use the below python package:
#python #set #ordered_set #orderedset
set
in Python it makes sure that your list is unique, but does not keep the insertion order ofthe set. For that use the below python package:
https://pypi.python.org/pypi/orderedset
NOTE:
becareful if you want to use it in production as it is 5 times slower than set!#python #set #ordered_set #orderedset
It is best practice to always set server date/time to UTC. In debian in order to configure your time and set it to UTC, do as follow:
Now select
To check your server date/time issue date command:
#date #dpkg-reconfigure #tzdata #UTC #timezone
sudo dpkg-reconfigure tzdata
Now select
None of the above
or Etc
and then press OK. Now select UTC
. You're done.To check your server date/time issue date command:
root@serv01:~# date
Mon Mar 5 11:20:59 UTC 2018
#date #dpkg-reconfigure #tzdata #UTC #timezone
In MongoDB it is suggested to turn
To run off
Add
Yours may be a little bit different. Now reboot your server using
Now you can check it by
In the next post we test this using
#mongodb #mongo #noatime #atime #xfs #linux #fstab #mount
atime
to off. atime
is set by Linux
on each file accessed by applications. It is reported repeatedly that turning it off will improve disk performance on that partition.To run off
atime
you need to set noatime
on the partition you are placing mongoDB database files. Open /etc/fstab
and look for your desired partition (mine is `/var`):/dev/mapper/mongo--vg-var /var xfs defaults 0 2
Add
noatime
after defaults
:/dev/mapper/mongo--vg-var /var xfs defaults,noatime 0 2
Yours may be a little bit different. Now reboot your server using
reboot --reboot
. Now you can check it by
mount -l
whether noatime
is set or not:/dev/mapper/mongo--vg-var on /var type xfs (rw,noatime,attr2,inode64,logbsize=256k,sunit=512,swidth=1024,noquota)
In the next post we test this using
touch
command in Linux
.#mongodb #mongo #noatime #atime #xfs #linux #fstab #mount
This media is not supported in your browser
VIEW IN TELEGRAM
صفحه لاگین خلاقانه 😍
Tech C**P
Zed_A_Shaw_Learn_Python_3_the_Hard.pdf
Learn Python 3 the hardway. Applicable for those who has just started programming with Python 3.
سلام دوستان عزیز 😊
دوستان یکسری پادکست براتون در نظر دارم که در حدود 20 پادکست یک ساعته هست. یکی از بهترین پادکستهای موجود در زمینه بحث scaling و management که با مدیران شرکتهای فیسبوک، گوگل، اوبر و... صحبت میشه و تجارب ناب تکنیکال در اختیارتون قرار میگیره. منتظر سری اول پادکستهای کانال باشید. صبحتون پر نشااااااااااط 🏃😋
Stay tuned! 😍
#podcast #intro
دوستان یکسری پادکست براتون در نظر دارم که در حدود 20 پادکست یک ساعته هست. یکی از بهترین پادکستهای موجود در زمینه بحث scaling و management که با مدیران شرکتهای فیسبوک، گوگل، اوبر و... صحبت میشه و تجارب ناب تکنیکال در اختیارتون قرار میگیره. منتظر سری اول پادکستهای کانال باشید. صبحتون پر نشااااااااااط 🏃😋
Stay tuned! 😍
#podcast #intro
How do you give maintenance for your infrastructure when a new BIG deployment comes in?
You can use
Inside of your
What happens here is that we first check for a file named
Outside of location we need to server
And with an exact match for the file (`location =`) we serve that static page from root of
The note about this code is that when your file is named
#linux #nginx #maintenance #maintenance_mode #location #error_page
You can use
nginX
to display a nice page about your maintenance. First of all create your fancy landing page for your maintenance in html format with the name of maintenance_off.html
.Inside of your
server
block in nginX configuration we do like below:server {
...
location / {
if (-f /webapps/your_app/maintenance_on.html) {
return 503;
}
...
}
# Error pages.
error_page 503 /maintenance_on.html;
location = /maintenance_on.html {
root /webapps/your_app/;
}
...
}
What happens here is that we first check for a file named
maintenance_on.html
, if it's present we return 503 Server error
. This error code is returned when server is not available. This code is inside of location
section of root.Outside of location we need to server
/maintenance_on.html
for error 503:error_page 503 /maintenance_on.html;
And with an exact match for the file (`location =`) we serve that static page from root of
/webapps/your_app/
.The note about this code is that when your file is named
maintenance_off.html
maintenance will be ignored and when we rename the file to maintenance_on.html
then error 503 is returned.#linux #nginx #maintenance #maintenance_mode #location #error_page
There are many other ways to put a website in maintenance mode, like to allow specific ip addresses to see the website but others see the maintenance mode page:
This is it. If you don't know what the above code do, then SEARCH. :)
#nginx #linux #maintenance #maintenance_mode #503
server {
..
set $maintenance on;
if ($remote_addr ~ (34.34.133.12|53.13.53.12)) {
set $maintenance off;
}
if ($maintenance = on) {
return 503;
}
location /maintenance {
}
error_page 503 @maintenance;
location @maintenance {
root /var/www/html/maintenance;
rewrite ^(.*)$ /index.html break;
}
..
}
This is it. If you don't know what the above code do, then SEARCH. :)
#nginx #linux #maintenance #maintenance_mode #503
وقتی اسنپ تریپ از هول عید برنامه خود را سریع وارد بازار می کند!
#بی_برنامگی #فرجه #اسنپ
#deadline #snapptrip
#بی_برنامگی #فرجه #اسنپ
#deadline #snapptrip
Tech C**P
#1 Airbnb's Brian Chesky in Handcrafted.mp3
دوستان این پادکست ها همون پادکست هایی بود که بهتون قولش رو داده بودم. حتما حتما حتما گوش فرا دهید. بسیار مفید هست و توانمندی های فنی و planning شما رو به شدت بهتر میکند و خواهید دید که شرکتهای بزرگ چگونه بزرگ شدند. آیا aribnb از ابتدا بزرگ بوده؟ از کجا شروع کردند؟ چگونه بازار هدف را پیدا کردند؟ و...
Tech C**P
#2 The Money Episode w_ Minted's Mariam Naficy.mp3
مصاحبه با مریم نفیسی co-founder سایت eve و یکی از کارآفرینان مطرح آمریکا در مورد نحوه رشد شرکت و جذب سرمایه گذار و...