forked from linkerd/linkerd
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update Delegator interface to return a single value only (linkerd#1862)
The Delegator interface defines a `delegate` method that returns an Activity. However, in all cases, only the first value of this Activity was ever used (for the delegator UI). For complex delegations with fast changing values, a delegation lookup could be quite expensive because many values would be calculated before the Activity was canceled. We modify the `delegate` method to return a Future instead of an Activity. This implies changes to all of Namerd's interfaces. * thriftNamerInterface: We change the client to do a one-shot call with an empty stamp and ignore the stamp in the response instead of long-polling. For backwards compatibility with long-polling clients, we modify the server to keep requests that have a non-empty stamp pending until cancelled by the client. * http streaming: No change necessary because the delegate method never took advantage of http streaming. * mesh: We deprecate the StreamDelegateTree method and modify the implementation to only return a single value on the stream. I have manually tested all combinations of: * client version = {1.3.5, HEAD} * server version = {1.3.5, HEAD} * interface = {thriftNamerInterface, mesh, http streaming} Fixes linkerd#1846 Signed-off-by: Alex Leong <[email protected]>
- Loading branch information
Showing
23 changed files
with
160 additions
and
155 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -161,4 +161,6 @@ object Stream { | |
} | ||
} | ||
|
||
def fromFuture[T](fut: Future[T]): Stream[T] = deferred(fut.map(value)) | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,30 @@ | ||
# Use namerd for name resolution. | ||
routers: | ||
- protocol: http | ||
label: named-thrift | ||
interpreter: | ||
kind: io.l5d.namerd | ||
dst: /$/inet/localhost/4100 | ||
namespace: default | ||
servers: | ||
- port: 4140 | ||
ip: 0.0.0.0 | ||
- protocol: http | ||
label: named-http | ||
interpreter: | ||
kind: io.l5d.namerd.http | ||
experimental: true | ||
dst: /$/inet/localhost/4180 | ||
namespace: default | ||
servers: | ||
- port: 4141 | ||
ip: 0.0.0.0 | ||
- protocol: http | ||
label: named-grpc | ||
interpreter: | ||
kind: io.l5d.mesh | ||
dst: /$/inet/localhost/4321 | ||
root: /default | ||
servers: | ||
- port: 4142 | ||
ip: 0.0.0.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
admin: | ||
port: 9991 | ||
|
||
storage: | ||
kind: io.l5d.inMemory | ||
namespaces: | ||
default: /svc => /#/io.l5d.fs; | ||
|
||
namers: | ||
- kind: io.l5d.fs | ||
rootDir: namerd/examples/disco | ||
|
||
interfaces: | ||
- kind: io.l5d.httpController | ||
- kind: io.l5d.mesh | ||
- kind: io.l5d.thriftNameInterpreter |
Oops, something went wrong.