Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Amazon Dynamo for token management #28

Open
akbarahmed opened this issue Aug 31, 2016 · 15 comments
Open

Amazon Dynamo for token management #28

akbarahmed opened this issue Aug 31, 2016 · 15 comments

Comments

@akbarahmed
Copy link
Contributor

This is a feature proposal to add an Amazon Dynamo DAO for token management.

We are actively working on this feature and will issue a PR when ready.

@avinashZato
Copy link

Hi Akbar,

I couldn't find material on DynomiteDB or on other forums for the following questions:

  1. How are the tokens re-calculated when a node joins/ leaves the cluster?
  2. How is the data rebalanced after the tokens are re-calculated? Is this even a Dynomite concern?

Any pointers will really help.

@akbarahmed
Copy link
Contributor Author

@avinashZato

  • Node tokens are calculated when the cluster is first created. Then, when a node is replaced (ex. if a node fails), the new node queries the list of node tokens to find a previously failed token. It allocates the previously failed token to itself, and begins an automated recovery process. Once the node is full healed, it rejoins the cluster automatically.
  • When a node leaves the cluster (ex. when it fails), the Dyno client will be notified of the failure due to failed health checks and will direct traffic away from the failed node...until it is brought back online.
  • If you are adding a single node, say with a minor scale up, then this is currently not an automated process. There is ongoing work to allow automated scale up with rebalancing by doubling the cluster size. Please add a watch to the project on GH to be notified when this PR is submitted.
  • Automated data rebalancing is not currently implemented.

Typically, you'll deploy a Dynomite cluster with a somewhat fixed size. However, as mentioned above, there is active work to automate the scale up/down process.

@avinashZato
Copy link

Appreciate your quick response here @akbarahmed !
Our deployment falls in category three that you've listed above where we incrementally add nodes.

To give you some context, we typically have an on-premise deployment where the customer would typically start with N nodes each with a capacity of C. Depending on the load a new Node N1 will be added with the same capacity C.

For approach three (the manual process), we'll probably follow the steps recommended by @Minh in #173 .

If it isn't too much to ask do you have a tentative date for when the PR would be submitted?

@akbarahmed
Copy link
Contributor Author

There's no ETA for when the PR will be ready.

@ipapapa
Copy link
Contributor

ipapapa commented Sep 5, 2016

@avinashZato I am not following why Dynomite needs to follow the diurnal pattern of the client. In fact, if you plan to scale up then you need to scale down, and generally speaking stateful systems must not follow that pattern because data can get out of sync.

If you are using Dynomite as a cache, then it means that you set a short TTL on the data. Hence the Dyno dual write functionality would probably solve your problem. In other words, you will bring a new Dynomite cluster that has some extra capacity, dual write to it, then take the older cluster down once the data have expired. The same way can work for scaling down.

@ipapapa
Copy link
Contributor

ipapapa commented Sep 5, 2016

@akbarahmed I like a lot having the DynamoDB DAO because it supports cross-region replication and you do not need another system outside of AWS. In case of region outage, we can move everything to another region and still have the tokens to come back to the failed region. This was the idea behind the Cassandra DAO. @diegopacheco was also considering changing the Astyanax to the Datastax Java Driver, which would make the DAO a little more standardized, but I am not sure how far he got with it.

@diegopacheco
Copy link
Contributor

@ipapapa not much far yet.

@diegopacheco
Copy link
Contributor

@ipapapa This is working in progress. You can follow progress here https://github.com/diegopacheco/dynomite-manager-1/tree/dev-datastax-javadriver I will fire a PR once I'm done. :-)

@ipapapa
Copy link
Contributor

ipapapa commented Aug 24, 2017

DynamoDB does not actually support bi-directional cross-region replication (only one way). More info. Hence at this point, I do not see any reason to pursue the DynamoDB DAO. We can revisit this one bi-directional replication is added.

@ipapapa ipapapa closed this as completed Aug 24, 2017
@posix4e
Copy link

posix4e commented Dec 24, 2018

This claims it is full multi region , can we reopen this?https://aws.amazon.com/dynamodb/global-tables/

@ipapapa ipapapa reopened this Dec 25, 2018
@ipapapa
Copy link
Contributor

ipapapa commented Dec 25, 2018

@posix4e Done. It would be really nice to see the DAO being added.

@posix4e
Copy link

posix4e commented Dec 25, 2018

dao?

@ipapapa
Copy link
Contributor

ipapapa commented Dec 26, 2018

DAO = Data Access Object. It is a Java design pattern. More information: https://www.oracle.com/technetwork/java/dataaccessobject-138824.html

@srinivas-c
Copy link

srinivas-c commented Nov 1, 2019

@ipapapa , @akbarahmed
Any update on supporting DynamoDB for token management. We will be eager to use this :)

Thanks in advance

@srinivas-c
Copy link

srinivas-c commented Nov 5, 2019

Hi,

I submitted a pull request for DynamoDB support, the only piece missing is integrating dynamodb with Florida. Can you review and share comments if any
#114

Thanks

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

No branches or pull requests

6 participants