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

AWS Lambda #38

Open
bertbeck opened this issue Nov 10, 2022 · 5 comments
Open

AWS Lambda #38

bertbeck opened this issue Nov 10, 2022 · 5 comments

Comments

@bertbeck
Copy link

I'd like to use this code in an AWS Lambda. Is it possible to get a unique 16 bit id for the lambda instance it is running in? The equivalent of AmazonEC2MachineID() but for Lambdas.

As I understand it - Lambda's are limited to 1000 instances - so if we could get something like a "slot" number, ir a unique number from 0 to 999, 1 to 1000 etc - that would be even better and we could reduce the size of the server id field.

@yuokada (or anyone) please let me know if this is possible. I would pay for help with this.

@yuokada
Copy link
Contributor

yuokada commented Nov 11, 2022

I'm just a contributor. I have no responsibility for this repo.

TO: the owner of this repo. Please consider to put the CODEOWNER file or something to reveal the owner.

@bertbeck
Copy link
Author

bertbeck commented Nov 11, 2022 via email

@yuokada
Copy link
Contributor

yuokada commented Nov 11, 2022

Unfortunately, I've never written the code using this library on AWS lambda.

But, as far as I roughly read your comment, it doesn't sound good to shrink random IDs to less than 1000.
In my understanding, each lambda instance (or container) is unique and not reusable. So, we should give an unique ID (or number) to it.

@bertbeck
Copy link
Author

bertbeck commented Nov 20, 2022 via email

@YoshiyukiMineo
Copy link
Member

The continuity of server instances is important because Sonyflake is based on system clocks. So in that sense, AWS Lambda is not suitable to run Sonyflake.

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

No branches or pull requests

3 participants