ownership của biến khi truyền vào function ngáo vkd, hình như không có ngôn ngữ nào bị ngáo như thế (với hiểu biết của mình ở c/c++, c#, jav, python) thôi không hẹn gặp rust.
Ý Hồng Hà nói là master/slave dns phải không?
Nếu là master/slave thì là một cấu hình không đối xứng nên không thích lắm. Có 1 giải pháp khác hay hơn là dùng docker dns, chạy bao nhiêu node cũng được và các node này đều giống nhau như đúc (vì cùng 1 file cấu hình)
Khi chuyển qua dùng docker thì cần lưu ý những file, thư mục cấu hình dns sau:
+file named.conf
+file named.conf.local
+thư mục zones
Để chuyển qua dùng docker thì ta thực hiện như sau:
1/ Chuyển các file, thư mục cấu hình dns vào server nfs (192.168.99.53)
2/ Với những node chạy dns server thì mount các file thư mục ở bước 1 vào thư mục /opt/dns/
3/ Sửa 1 xíu ở file cấu hình named.conf:
listen-on port 53 { any; };
allow-query { any; };
4/Chạy docker ở các node, ví dụ ta có 2 node server có ip 192.168.99.51 và 192.168.99.54
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class Profile extends Model
{
use HasFactory;
protected $table = 'profile';
/**
* The primary key associated with the table.
*
* @var string
*/
protected $primaryKey = 'id';
public $timestamps = false;
protected $fillable = [
'age',
'gender',
];
}
// ==
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateProfileTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('profile', function (Blueprint $table) {
$table->id();
$table->integer("user_id");
$table->integer("age");
$table->integer("gender");
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('profile');
}
}
THẢO LUẬN
Cảm ơn comment mang tính đóng góp, giấu tên một cách kín đáo của bạn
Kiến thức rất hay, dễ hiểu để tiếp thu Cảm ơn tấm lòng của người đăng ạ ^^
Sắp tới sẽ có bài về Spring Security nhé, hi vọng giúp bác hiểu rõ hơn phần nào
@hmquan08011996 pro ơi e có update code nhưng terraform plan nó cứ không báo thay đổi gì ạ! e update code vào master branch của repo
lên aws thì nó vẫn ko đổi
pro biết nguyên nhân ko giúp e vs ạ!
ownership của biến khi truyền vào function ngáo vkd, hình như không có ngôn ngữ nào bị ngáo như thế (với hiểu biết của mình ở c/c++, c#, jav, python) thôi không hẹn gặp rust.
Sao em ko thấy thư mục "complete" và file "serve.py" đâu ạ Ai cho em xin code để infrence với? Xin cảm ơn
Em thấy công ty vậy là cũng update phết :v chứ giờ cần performance cao mà bắt em viết C++ các kiểu thì thôi cho em một phiếu học Rust <(")
bài viết hay lắm, nhưng trong quá trình học spring boot mình nghẹn nhất ở spring security.....
Mình đề nghị bạn Mai mở 1 buổi nói chuyện online về YOLO V7 đi
Tuyệt vời quá bạn Mai ơi!!! Ước gì bạn Mai làm video đăng trên youtube nói về YOLO và thấy mặt bạn. Tuyệt quá! ngưỡng mộ
Hay quá chời, cảm ơn bạn :3
Ý Hồng Hà nói là master/slave dns phải không? Nếu là master/slave thì là một cấu hình không đối xứng nên không thích lắm. Có 1 giải pháp khác hay hơn là dùng docker dns, chạy bao nhiêu node cũng được và các node này đều giống nhau như đúc (vì cùng 1 file cấu hình)
Khi chuyển qua dùng docker thì cần lưu ý những file, thư mục cấu hình dns sau:
+file named.conf
+file named.conf.local
+thư mục zones
Để chuyển qua dùng docker thì ta thực hiện như sau:
1/ Chuyển các file, thư mục cấu hình dns vào server nfs (192.168.99.53)
2/ Với những node chạy dns server thì mount các file thư mục ở bước 1 vào thư mục /opt/dns/
3/ Sửa 1 xíu ở file cấu hình named.conf: listen-on port 53 { any; }; allow-query { any; };
4/Chạy docker ở các node, ví dụ ta có 2 node server có ip 192.168.99.51 và 192.168.99.54
+node1:
$ docker run --name dns_server1 --privileged=true -p 53:53/udp -p 53:53/tcp -v /opt/dns/named.conf:/etc/named.conf -v /opt/dns/named.conf.local:/etc/named/named.conf.local -v /opt/dns/zones:/etc/named/zones -d kevinchu148/dns
+node2:
docker run --name dns_server1 --privileged=true -p 53:53/udp -p 53:53/tcp -v /opt/dns/named.conf:/etc/named.conf -v /opt/dns/named.conf.local:/etc/named/named.conf.local -v /opt/dns/zones:/etc/named/zones -d kevinchu148/dns
5/ Firewall của mỗi node server
$ firewall-cmd --permanent --zone=trusted --add-port=53/tcp
$ firewall-cmd --permanent --zone=trusted --add-port=53/udp
$ firewall-cmd --reload
Như vậy là ta đã có 2 node dns
One To One
<?php namespace App\Models; use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\Model; class Profile extends Model { use HasFactory; protected $table = 'profile'; /** * The primary key associated with the table. * * @var string */ protected $primaryKey = 'id'; public $timestamps = false; protected $fillable = [ 'age', 'gender', ]; } // == <?php use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; class CreateProfileTable extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::create('profile', function (Blueprint $table) { $table->id(); $table->integer("user_id"); $table->integer("age"); $table->integer("gender"); $table->timestamps(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('profile'); } }A ơi a cập nhật document cho đoạn invoke service. vô application đc k a, đoạn đó e k thấy a giải thích mấy
Đôi lúc dùng medium.net.vn sẽ tiện hơn
mình sn 96
thằng lùa gà là giỏi, cái tính năng đầu tiên xuất hiện java 9 java 11 gì đó rồi
Anh cho em hỏi sao hông dùng post để nhập thông tin mới được ạ em chỉ chỉnh sử các cột trong bảng thôi
Phần 2 đâu người ae?
bài viết rất bổ ích luôn, mà tiện thể anh sinh năm bao nhiêu thế ạ =)