Let me give you an example of a two officer marriage
@Cadette20 . They are both Army so the situation certainly isn't exactly analogous. This is simply meant to share one military couple's approach.
This involves my DS, Army 1Lt and his soon-to-be Army 1Lt DW. They were a year apart in the same AROTC battalion. They were married shortly after he went AD and she was in her final year of school. He had discussed with us the possibility of them getting married, but we were not informed until after they'd pulled the trigger. With both of them so busy, there was no time to plan a real wedding, which my DW still can't get over. DS and DIL are two strong personalities, one an irresistible force and one an immovable object.
Without expressing this notion, I believe they understood that one's 20's are in many ways the most consequential time in a young person's life. It is the time when a person builds a skill set. Whether one is a professional pilot, a neurosurgeon, a plumber, or a SEAL, those specific skills are learned and honed in one's 20's. It is a perfect time marrying an educational foundation, youthful curiosity, physical stamina and a desire to go out and actual accomplish something. They concluded that if they both went AD and tried to stay together, that one of their two paths to the future would be affected negatively. All of this was thought out ahead of time before making the decision.
DS went AD several months after commissioning, spent 16 weeks in Basic Officer Leadership Course, then off to the ME for 15 of the next 16 months. In the meanwhile, DIL finished school, commissioned into the Army Reserves (branched Finance Corps), and started a job in which she is thriving. DS is based in FL on the Redneck Riviera, she in the Wasatch Range in UT. If one likes the beach and the mountains--they receive 400" of snow per year--it is about perfect. I can't tell you how many days a year they get to spend together, but I can tell you that they plan as many as possible. Yes, there are separation issues. She takes care of the house they bought and AIRBNB from time to time. He just misses her. More than once, he remarked while in the ME, "I just want to get back and see ******."
Several months ago, DS had to begin thinking about his promotion to Captain and making decisions that would potentially extend his his Army career by two years and probably reduce their time together. When I discussed it with him, i.e. listened to what he had to say and kept my mouth shut, he said quite clearly that ****** could nix the whole thing. She didn't. He is preparing diligently for his next step. She received a good promotion, gets to take her dog to work and couldn't be happier. On the surface, they may appear to be selfish. Each is concentrated on his/her own path to the future. I can tell you, however, that they are devoted to one another and truly enjoy the other's success. (I would also add that DS got the better end of this whole bargain.)
Each marriage is different, but they all have something in common, whether a prolonged separation is likely or not. You and your partner have to be completely honest about your long term goals and what you are or aren't willing to sacrifice. You have to be supportive of the other's success. If you can do that and truly say "That's the one. I can't let him/her get away," then the rest is just details.
Best of luck in whatever you do.