infinyon / fluvio Goto Github PK
View Code? Open in Web Editor NEWLean and mean distributed stream processing system written in rust and web assembly.
Home Page: https://www.fluvio.io/
License: Apache License 2.0
Lean and mean distributed stream processing system written in rust and web assembly.
Home Page: https://www.fluvio.io/
License: Apache License 2.0
External public API should use TLS.
Components impacted: API (Node, Rust), CLI, SC, SPU
topic with 2 replica:
kc get partition
NAME LEADER FOLLOWERS STATUS LSR HW EOF FOLLOWER OFFSETS
test1-0 0 [0 1] Offline 0 0 0 []
kc get spu
NAME ID STATUS TYPE PUBLIC HOST PRIVATE HOST PORT
main-0 0 Online Managed map[encryption:PLAINTEXT ingress:[map[ip:10.107.159.255]] port:9005] flv-spg-main-0.flv-spg-main 9006
main-1 1 Online Managed map[encryption:PLAINTEXT ingress:[map[ip:10.106.230.223]] port:9005] flv-spg-main-1.flv-spg-main 9006
seems like SPU-0 received topic with spu 0 as follower other way around
kc logs flv-spg-main-0
20:28:47.481 INFO flv_spu::config::cli > extracting SPU from: flv-spg-main-0
20:28:47.481 INFO flv_spu::config::cli > found SPU INDEX ID: 0
20:28:47.481 INFO flv_spu::config::cli > using sc endpoint from env var: flv-sc-internal.default.svc.cluster.local:9004
20:28:47.482 INFO flv_spu::config::cli > overriding log base: /tmp/fluvio
20:28:47.482 INFO flv_spu::config::cli > overriding log size 1Gi
starting spu server (id:0)
SPU Version: 0.3.0 started successfully
20:28:47.482 INFO flv_spu::services::public > starting SPU: 0 at public service at: 0.0.0.0:9005
20:28:47.482 INFO flv_spu::services::internal > starting SPU: 0 at internal service at: 0.0.0.0:9006
20:28:47.483 INFO kf_service::kf_server > starting event loop for: 0.0.0.0:9006
20:28:47.483 INFO kf_service::kf_server > starting event loop for: 0.0.0.0:9005
20:28:56.882 WARN flv_spu::controllers::leader_replica::connection > replica leader: test1-0 was not found
20:29:56.882 WARN flv_spu::controllers::leader_replica::connection > replica leader: test1-0 was not found
20:30:56.883 WARN flv_spu::controllers::leader_replica::connection > replica leader: test1-0 was not found
20:31:56.883 WARN flv_spu::controllers::leader_replica::connection > replica leader: test1-0 was not found
20:32:56.884 WARN flv_spu::controllers::leader_replica::connection > replica leader: test1-0 was not found
20:33:56.887 WARN flv_spu::controllers::leader_replica::connection > replica leader: test1-0 was not found
20:34:56.886 WARN flv_spu::controllers::leader_replica::connection > replica leader: test1-0 was not found
20:35:56.887 WARN flv_spu::controllers::leader_replica::connection > replica leader: test1-0 was not found
20:36:56.888 WARN flv_spu::controllers::leader_replica::connection > replica leader: test1-0 was not found
kc logs flv-spg-main-1
20:28:50.541 INFO flv_spu::config::cli > extracting SPU from: flv-spg-main-1
20:28:50.541 INFO flv_spu::config::cli > found SPU INDEX ID: 1
20:28:50.541 INFO flv_spu::config::cli > using sc endpoint from env var: flv-sc-internal.default.svc.cluster.local:9004
20:28:50.541 INFO flv_spu::config::cli > overriding log base: /tmp/fluvio
20:28:50.541 INFO flv_spu::config::cli > overriding log size 1Gi
20:28:50.541 INFO flv_spu::services::public > starting SPU: 1 at public service at: 0.0.0.0:9005
20:28:50.541 INFO flv_spu::services::internal > starting SPU: 1 at internal service at: 0.0.0.0:9006
starting spu server (id:1)
SPU Version: 0.3.0 started successfully
20:28:50.542 INFO kf_service::kf_server > starting event loop for: 0.0.0.0:9005
20:28:50.543 INFO kf_service::kf_server > starting event loop for: 0.0.0.0:9006
When topic is being deleted, it should go thru following stages:
number of SPU
in the cluster install.launching SPU (2 of 4)
built in installer to Fluvio CLI instead of using helm.
Benefits
First production version
access fluvio using websocket protocol
We need to update the CLI documentation on the Fluvio docs website.
Review and update
Required for this issue:
Future work:
To allow Fluvio to run on AWS EKS environment.
$ ./target/debug/fluvio topic create test -p 1 -r 2
topic "test" created
$ ./target/debug/fluvio topic describe -t test
Name : test
Type : computed
Partition Count : 1
Replication Factor : 2
Ignore Rack Assignment : -
Status : provisioned
Reason : -
Partition Map
-----------------
ID LEADER REPLICAS LIVE-REPLICAS
0 5003 [5003, 5001] [0, 5001]
$ ./target/debug/fluvio spu list
ID NAME STATUS TYPE RACK PUBLIC PRIVATE
5001 custom-spu-5001 online custom - localhost:9010 localhost:9011
5002 custom-spu-5002 online custom - localhost:9020 localhost:9021
5003 custom-spu-5003 online custom - localhost:9030 localhost:9031
The comment:
./target/debug/fluvio consume -h
...
-o, --offset <integer> optional, offset, negate offset is relative to end offset (either committed or uncommitted)
should be changed to
./target/debug/fluvio consume -h
...
-o, --offset <integer> Offsets can be positive or negative. (Syntax for negative offset: --offset="-1")
Steps to reproduce:
Create 2 custom SPU:
kc apply -f k8-util/samples/crd/spu_5001.yaml
kc apply -f k8-util/samples/crd/spu_5002.yaml
Bring up first SPU
./dev-tools/log/debug-spu-min 5001 9005 9006
The SPU list shows only first SPU is up
$ flvd spu list
ID NAME STATUS TYPE RACK PUBLIC PRIVATE
5002 custom-spu-2 Offline "custom" - localhost:9007 localhost:9008
5001 custom-spu-1 Online "custom" - localhost:9005 localhost:9006
Now create topic with 2 replicas
flvd partition list
TOPIC PARTITION LEADER REPLICAS RESOLUTION HW LEO LSR FOLLOWER OFFSETS
message 0 5001 [5002] Online 0 0 0 [ReplicaStatus { spu: 5002, hw: -1, leo: -1 }]
shows that online leader is used
Incorporate change log into release process.
Some good practice:
Steps to reproduce:
fluvio spu list --sc localhost:9003
error: cannot retrieve spus: Connection refused (os error 61)
Note: IP address works fine
fluvio spu list --sc 127.0.0.1:9003
ID NAME STATUS TYPE RACK PUBLIC PRIVATE
5001 custom-spu-1 online custom - localhost:9005 localhost:9006
5002 custom-spu-2 online custom - localhost:9007 localhost:9008
5003 custom-spu-3 online custom - localhost:9009 localhost:9010
Example:
Name : test1
Type : computed
Partition Count : 1
Replication Factor : 2
Ignore Rack Assignment : -
Status : provisioned
Reason : -
Partition Map
-----------------
ID LEADER REPLICAS LIVE-REPLICAS
0 0 [0, 1] [1]
Live replicas contains follow but replica contain leader and follower. They should be consistent.
Steps to reproduce:
Create topic:
./target/debug/fluvio topic create -t my-topic-1 -p 1 -r 2
Create first consumer
./target/debug/fluvio consume -t my-topic-1 -p 0 -C
Create second consumer
./target/debug/fluvio consume -t my-topic-1 -p 0 -C
Create producer
./target/debug/fluvio produce -t my-topic-1 -p 0 -C
type a few lines... only 1 consumer gets the messages.
Github action to install and Run Fluvio
Build version of SC that works against local in memory metadata store. With in memory metadata store, we can build local cluster suitable for
The in memory store implements traits in: https://docs.rs/k8-metadata-client/1.0.1/k8_metadata_client/trait.MetadataClient.html.
Implementation should support full fluvio lifecycle:
show client-rs version
show list of kf versions as well.
Currently every write incur flush call. Delay flush based on following criteria
Bonus: should be configurable
Hello,
I'm following process in Developer.md
now. Seems:
$ ./dev-tools/log/debug-sc-min
./dev-tools/log/debug-sc-min: line 5: /Users/djKooks/workspace/etc/rust/fluvio/dev-tools/log/../../target/debug/sc-k8-server: No such file or directory
...
$ ./dev-tools/log/debug-spu-min 5001 9005 9006 ⏎
./dev-tools/log/debug-spu-min: line 9: /Users/djKooks/workspace/etc/rust/fluvio/dev-tools/log/../../target/debug/spu-server: No such file or directory
...
$ ./target/debug/fluvio spu list --sc 127.0.0.1:9003 ⏎
error: IoError(
Custom {
kind: ConnectionRefused,
error: VerboseError {
source: Os {
code: 61,
kind: ConnectionRefused,
message: "Connection refused",
},
message: "could not connect to 127.0.0.1:9003",
},
},
)
Is there something wrong in my process?
Check if version is available in fluvio helm repo before proceeding to install.
in Mac OS/BSD, /tmp location are clearly every 3 days. should change default location to appropriate for each OS
Steps to reproduce:
After few minutes, SPU reconnect without delay, it should wait 60 seconds.
CLI should perform local cluster installation using cargo install by default.
So fluvio install --local
should expand into
cargo install flv-sc-k8-server
,
cargo install flv-spu-server
then, it can search binary in the cargo .bin directory. This requires
It should support --path
to specify local fluvio repo path. This will invoke cargo build
and search binaries in the target
directory.
Fluvio uses zero copy I/o to transfer records from SPU to client.
Records to need to be limit since maximum bytes can be up to 1G for each segment.
Solution:
Access fluvio using HTTP protocol.
May follow Kafka HTTP Proxy url.
stress test configuration
C based library which can be used by any language.
This means we provide "C" export interface on top of the rust native library.
See: Mesa Link as example
CLI release tag should be derived from Cargo.toml
Your project is intriguing!
I was looking through your source, and was wondering if you've considered using NATS as a protocol? NATS is lightweight and has cloud native features that would trickle up to making your cli's and operations easier. For a specific example, your users wouldn't need to provision a topic and setup partitions with the cli before sending. You'd also be able to securely provide multi-tenancy from the get-go, which would make it easier to use fluvio in a PaaS/SaaS model.
From an adoption standpoint, you'd be able to reach both the NATS and Kafka ecosystems with the NATS Kafka bridge - best of both worlds. Just a thought....
Full disclosure, I'm a NATS maintainer so have bias, but noticed your project and just wanted to make you aware of NATS.
I wish you luck - we'll be following you guys!
Steps to reproduce in dev
cargo build
target/debug/cluster install --local
which only creates 1 SPUfluvio topic create --topic test --replication 2
which requires 2 SPUThis result in error:
topic error 'test2' error
this is not descriptive error. it should return proper error message
Any high level architecuture desing? I'm interested in contributing this, but it seems there's not enough information about this.
Since SPU performs replication, there is no need to use PVC.
Requires changing helm templating to use different storage provider
Allow multiple concurrent connection over same TCP/IP.
Enforce formatting
This need updated version of flv_future
for public port: 0.0.0.0:9005
,
for private port: 0.0.0.0:9004
,
Upgraded to futures 0.3.
Adopt async-std for futures library.
Isahc for http client.
Currently, SPU re-connect to SC every 60 seconds to avoid issue with TCP connection. It would better if periodic resync is perform between SC and SPU. if re-sync doesn't not occur, full reconnect will occur
If you add 5 topics, the leader distribution should be spread evenly across SPUs.
In my environment I have 3 SPUs and I created 5 topics with 1 partition and 2 replicas each.
The topics are distributed as follows:
5001 - 3 x leaders
5002 - 2 x leaders
5003 - 0 x leaders
$ ./target/debug/fluvio topic describe
Retrieved 5 out of 5 topics
TOPIC DETAILS
-------------
Name : stress-test-topic
Type : computed
Partition Count : 1
Replication Factor : 2
Ignore Rack Assignment : yes
Status : provisioned
Reason : -
Partition Map
-----------------
ID LEADER REPLICAS LIVE-REPLICAS
0 5001 [5003, 5001] [0, 5003]
TOPIC DETAILS
-------------
Name : test
Type : computed
Partition Count : 1
Replication Factor : 2
Ignore Rack Assignment : -
Status : provisioned
Reason : -
Partition Map
-----------------
ID LEADER REPLICAS LIVE-REPLICAS
0 5001 [5003, 5001] [0, 5001]
TOPIC DETAILS
-------------
Name : test2
Type : computed
Partition Count : 1
Replication Factor : 2
Ignore Rack Assignment : -
Status : provisioned
Reason : -
Partition Map
-----------------
ID LEADER REPLICAS LIVE-REPLICAS
0 5001 [5001, 5002] [0, 5002]
TOPIC DETAILS
-------------
Name : test3
Type : computed
Partition Count : 1
Replication Factor : 2
Ignore Rack Assignment : -
Status : provisioned
Reason : -
Partition Map
-----------------
ID LEADER REPLICAS LIVE-REPLICAS
0 5002 [5002, 5003] [0, 5003]
TOPIC DETAILS
-------------
Name : test4
Type : computed
Partition Count : 1
Replication Factor : 2
Ignore Rack Assignment : -
Status : provisioned
Reason : -
Partition Map
-----------------
ID LEADER REPLICAS LIVE-REPLICAS
0 5002 [5002, 5003] [0, 5003]
$ ./target/debug/fluvio spu list
ID NAME STATUS TYPE RACK PUBLIC PRIVATE
5001 custom-spu-5001 online custom - localhost:9010 localhost:9011
5002 custom-spu-5002 online custom - localhost:9020 localhost:9021
5003 custom-spu-5003 online custom - localhost:9030 localhost:9031
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.