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

feat: Enable data separation for each MixPanel API instance #830

Merged
merged 1 commit into from
Mar 14, 2024

Conversation

surajbokey-cred
Copy link
Contributor

Introducing Database Separation for Streamlined Event Routing

This pull request addresses the challenge of event data being directed to both Mixpanel and the proxy server due to a single database setup.

Problem:

Currently, all events are stored in a centralized database, regardless of their intended destination (Mixpanel or proxy server). This makes it impossible to control which events flow to each server.

Solution:

This pull request implements separate databases for each server, named according to their unique instanceName. This ensures events are routed to the appropriate server based on their origin.

Implementation:

  • The creation process for databases and AnalyticsMessage objects has been modified to utilize the instanceName instead of a context-based key.
  • This change guarantees the creation of distinct databases for each server, enabling proper event segregation.

Benefits:

  • Improved Data Control: This solution allows for precise control over event routing, eliminating the unintended duplication of data across servers.
  • Enhanced Efficiency: Separating data streams can potentially enhance performance and resource utilization for both Mixpanel and the proxy server.

@surajbokey-cred surajbokey-cred marked this pull request as ready for review March 4, 2024 01:39
@zihejia zihejia self-requested a review March 13, 2024 00:19
Copy link
Contributor

@zihejia zihejia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you so much!

@zihejia zihejia merged commit cf8840b into mixpanel:master Mar 14, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants