Ribbon integration by codefromthecrypt · Pull Request #2 · OpenFeign/feign · GitHub
Skip to content

Ribbon integration - #2

Merged
codefromthecrypt merged 1 commit into
masterfrom
ribbon-target
Jun 28, 2013
Merged

codefromthecrypt merged 1 commit into
masterfrom
ribbon-target

Conversation

@codefromthecrypt

Copy link
Copy Markdown

This pull request introduces the feign-ribbon module which includes a feign Target and Client adapter to take advantage of Ribbon.

Conventions

This integration relies on the Feign Target.url() being encoded like https://myAppProd where myAppProd is the ribbon client or loadbalancer name and myAppProd.ribbon.listOfServers configuration is set.

RibbonModule

Adding RibbonModule overrides URL resolution of Feign's client, adding smart routing and resiliency capabilities provided by Ribbon.

Usage

instead of 

MyService api = Feign.create(MyService.class, "https://myAppProd-1234567890.us-east-1.elb.amazonaws.com");

do

MyService api = Feign.create(MyService.class, "https://myAppProd", new RibbonModule());

LoadBalancingTarget

Using or extending LoadBalancingTarget will enable dynamic url discovery via ribbon including incrementing server request counts.

Usage

instead of

MyService api = Feign.create(MyService.class, "https://myAppProd-1234567890.us-east-1.elb.amazonaws.com");

do

MyService api = Feign.create(LoadBalancingTarget.create(MyService.class, "https://myAppProd"));

@codefromthecrypt

Copy link
Copy Markdown
Author

@codefromthecrypt

Copy link
Copy Markdown
Author

@jdamick you might be interested in this

codefromthecrypt pushed a commit that referenced this pull request Jun 28, 2013
@codefromthecrypt
codefromthecrypt merged commit 4f8890a into master Jun 28, 2013
@codefromthecrypt
codefromthecrypt deleted the ribbon-target branch June 28, 2013 22:02
@cloudbees-pull-request-builder

Copy link
Copy Markdown

feign-pull-requests #7 SUCCESS
This pull request looks good

@cloudbees-pull-request-builder

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants