Overview of hertz_session demo architecture
mainThe hertz_session demo demonstrates a distributed session solution using hertz-contrib/sessions. This approach stores sessions in Redis (or a Redis cluster) to ensure session synchronization across multiple servers in a distributed system.
Key technologies used in this demo:
- Session Management:
hertz-contrib/sessionsfor distributed sessions. - Security:
hertz-contrib/csrfto prevent Cross-Site Request Forgery attacks. - Interface Definition:
thriftIDL to define HTTP interfaces. - Code Generation:
hztoolkit to generate Hertz code from IDL. - Database:
GormwithMySQLfor data persistence. - Frontend:
AdminLTEfor login and registration pages.