You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@rocketmq.apache.org by GitBox <gi...@apache.org> on 2023/04/09 03:45:48 UTC

[GitHub] [rocketmq] echooymxq created a discussion: The proxy local mode?

GitHub user echooymxq created a discussion: The proxy local mode?

Proxy local mode has the ability of multi-protocol adaptation, with the advantages of low latency and high throughput. But it has additional problems, in local deployment mode, it becomes stateful. The client always need know which broker of Proxy is master, if the current connected proxy of broker is SLAVE, it will send message error. We should escape the message to remote broker in `LocalMessageService` when the current broker is SLAVE.
/cc @drpmma 

GitHub link: https://github.com/apache/rocketmq/discussions/6552

----
This is an automatically sent email for dev@rocketmq.apache.org.
To unsubscribe, please send an email to: dev-unsubscribe@rocketmq.apache.org


[GitHub] [rocketmq] drpmma edited a comment on the discussion: The proxy local mode?

Posted by GitBox <gi...@apache.org>.
GitHub user drpmma edited a comment on the discussion: The proxy local mode?

The local mode represents that the connection between Proxy and Broker is a local procedure call. So escaping the message to the remote broker is not recommended.  

As an alternative plan, the SLAVE broker should also have a proxy. The client will only send messages to MASTER node. If the MASTER node is down, the client will send messages to the new MASTER after the election.

GitHub link: https://github.com/apache/rocketmq/discussions/6552#discussioncomment-5567311

----
This is an automatically sent email for dev@rocketmq.apache.org.
To unsubscribe, please send an email to: dev-unsubscribe@rocketmq.apache.org


[GitHub] [rocketmq] echooymxq added a comment to the discussion: The proxy local mode?

Posted by GitBox <gi...@apache.org>.
GitHub user echooymxq added a comment to the discussion: The proxy local mode?

Yeah, But in the current implementation, it will not escape. In local mode, the client  doesn't actually know who is MASTER, because the topic route is wrapped. And as your say, in production, we will deploying the proxy on all the broker nodes(Because we don't know which broker is Master on autoswicth HA or Dledger mode).
I will submit a PR to optimize the message escape on local mode.

GitHub link: https://github.com/apache/rocketmq/discussions/6552#discussioncomment-5567467

----
This is an automatically sent email for dev@rocketmq.apache.org.
To unsubscribe, please send an email to: dev-unsubscribe@rocketmq.apache.org


[GitHub] [rocketmq] francisoliverlee added a comment to the discussion: The proxy local mode?

Posted by GitBox <gi...@apache.org>.
GitHub user francisoliverlee added a comment to the discussion: The proxy local mode?

+1.
proxies should be stateless, as the RED LINE shows.
![image](https://user-images.githubusercontent.com/5908412/230837294-d858fdbc-aae4-4881-a694-82baea127ccc.png)


GitHub link: https://github.com/apache/rocketmq/discussions/6552#discussioncomment-5568028

----
This is an automatically sent email for dev@rocketmq.apache.org.
To unsubscribe, please send an email to: dev-unsubscribe@rocketmq.apache.org


[GitHub] [rocketmq] drpmma added a comment to the discussion: The proxy local mode?

Posted by GitBox <gi...@apache.org>.
GitHub user drpmma added a comment to the discussion: The proxy local mode?

The local mode represents that the connection between Proxy and Broker is a local procedure call. So escaping the message to the remote broker is recommended.  

As an alternative plan, the SLAVE broker should also have a proxy. The client will only send messages to MASTER node. If the MASTER node is down, the client will send messages to the new MASTER after the election.

GitHub link: https://github.com/apache/rocketmq/discussions/6552#discussioncomment-5567311

----
This is an automatically sent email for dev@rocketmq.apache.org.
To unsubscribe, please send an email to: dev-unsubscribe@rocketmq.apache.org


[GitHub] [rocketmq] echooymxq added a comment to the discussion: The proxy local mode?

Posted by GitBox <gi...@apache.org>.
GitHub user echooymxq added a comment to the discussion: The proxy local mode?

Yeah, i misunderstood the local mode routing data, thank you.

GitHub link: https://github.com/apache/rocketmq/discussions/6552#discussioncomment-5635742

----
This is an automatically sent email for dev@rocketmq.apache.org.
To unsubscribe, please send an email to: dev-unsubscribe@rocketmq.apache.org


[GitHub] [rocketmq] drpmma added a comment to the discussion: The proxy local mode?

Posted by GitBox <gi...@apache.org>.
GitHub user drpmma added a comment to the discussion: The proxy local mode?

The escape concept is not necessary for local mode.

In local mode, the client is able to know who is MASTER just from the topic route. And the client will only send or receive from master.

See the code below.
https://github.com/apache/rocketmq/blob/3fe81bfbac11ee9a3bf9c21155d2c9c69570bb72/proxy/src/main/java/org/apache/rocketmq/proxy/grpc/v2/route/RouteActivity.java#L183-L215


GitHub link: https://github.com/apache/rocketmq/discussions/6552#discussioncomment-5634449

----
This is an automatically sent email for dev@rocketmq.apache.org.
To unsubscribe, please send an email to: dev-unsubscribe@rocketmq.apache.org


[GitHub] [rocketmq] echooymxq edited a discussion: The proxy local mode?

Posted by GitBox <gi...@apache.org>.
GitHub user echooymxq edited a discussion: The proxy local mode?

Proxy local mode has the ability of multi-protocol adaptation, with the advantages of low latency and high throughput. But it has additional problems, in local deployment mode, it becomes stateful. The client always need know which broker of Proxy is master, if the current connected proxy of broker is SLAVE, it will send message error. We should escape the message to remote broker in `LocalMessageService` when the current broker is SLAVE.

/cc @drpmma 

GitHub link: https://github.com/apache/rocketmq/discussions/6552

----
This is an automatically sent email for dev@rocketmq.apache.org.
To unsubscribe, please send an email to: dev-unsubscribe@rocketmq.apache.org