SeaweedFS is a distributed storage system for object storage (S3), file systems, Iceberg table buckets, and Lance vector buckets, designed to handle billions of files with O(1) disk access and effortless horizontal scaling.
Go blob-storagecloud-drivedistributed-file-systemdistributed-storageerasure-codingfusehadoop-hdfshdfskuberneteslancelancedbobject-storageposixs3s3-storageseaweedfstiered-file-systemvector-search
s3: bind to a specific IP
chrislu85c526c583f6
diff --git a/weed/command/filer.go b/weed/command/filer.goindex c5d538bfe0..876b1bbf01 100644--- a/weed/command/filer.go+++ b/weed/command/filer.go@@ -138,6 +138,7 @@ func runFiler(cmd *Command, args []string) bool {startDelay := time.Duration(2)if *filerStartS3 {filerS3Options.filer = &filerAddress+ filerS3Options.bindIp = f.bindIpgo func() {time.Sleep(startDelay * time.Second)filerS3Options.startS3Server()diff --git a/weed/command/s3.go b/weed/command/s3.goindex 1a4c89dc4c..d7cd7818db 100644--- a/weed/command/s3.go+++ b/weed/command/s3.go@@ -25,6 +25,7 @@ var (type S3Options struct {filer *string+ bindIp *stringport *intconfig *stringdomainName *string@@ -38,6 +39,7 @@ type S3Options struct {func init() {cmdS3.Run = runS3 // break init cycles3StandaloneOptions.filer = cmdS3.Flag.String("filer", "localhost:8888", "filer server address")+ s3StandaloneOptions.bindIp = cmdS3.Flag.String("ip.bind", "", "ip address to bind to")s3StandaloneOptions.port = cmdS3.Flag.Int("port", 8333, "s3 server http listen port")s3StandaloneOptions.domainName = cmdS3.Flag.String("domainName", "", "suffix of the host name in comma separated list, {bucket}.{domainName}")s3StandaloneOptions.config = cmdS3.Flag.String("config", "", "path to the config file")@@ -189,7 +191,7 @@ func (s3opt *S3Options) startS3Server() bool {httpS := &http.Server{Handler: router}- listenAddress := fmt.Sprintf(":%d", *s3opt.port)+ listenAddress := fmt.Sprintf("%s:%d", *s3opt.bindIp, *s3opt.port)s3ApiListener, err := util.NewListener(listenAddress, time.Duration(10)*time.Second)if err != nil {glog.Fatalf("S3 API Server listener on %s error: %v", listenAddress, err)diff --git a/weed/command/server.go b/weed/command/server.goindex 1a6393edf5..0cb7483812 100644--- a/weed/command/server.go+++ b/weed/command/server.go@@ -180,6 +180,7 @@ func runServer(cmd *Command, args []string) bool {filerOptions.masters = pb.ServerAddresses(*masterOptions.peers).ToAddresses()filerOptions.ip = serverIpfilerOptions.bindIp = serverBindIp+ s3Options.bindIp = serverBindIpserverOptions.v.ip = serverIpserverOptions.v.bindIp = serverBindIpserverOptions.v.masters = pb.ServerAddresses(*masterOptions.peers).ToAddresses()